LOS ANGELES — Coach Monty Williams said before the game that he needed a 48-minute effort from his New Orleans Pelicans on Sunday night.

Every NBA coach always wants that, but the Pelicans came through for Williams with a slump-busting, 104-87 victory over the Los Angeles Lakers on the same Staples Center floor where the Clippers had manhandled New Orleans by 20 points a night earlier.

“A great team win, in every essence of it,” Williams said after his team’s four-game road losing streak was snapped. “We had 28 assists. I can’t say enough about the ball movement. This is a test for us, to see if we can continue to play like this.”

The opposition obviously helped. The 5-16 Lakers recently have a been a cure for what ails the Pelicans — and a lot of teams. Last season, the Pelicans ended an eight-game losing streak March 4 with a 132-125 victory over the Lakers at Staples Center. New Orleans had lost five of its previous six, winning only at home against Oklahoma City. But now the Pelicans are 2-0 against the Lakers this season.

Pelicans point guard Jrue Holiday led the way this time with 22 points, eight assists and some tough defense, especially in the third quarter on Kobe Bryant. Holiday put an exclamation point on New Orleans’ ninth victory in 19 tries with a fourth-quarter, run-down block of a Ronnie Price breakaway attempt.

“I tried to be more aggressive offensively, and obviously that helped us tonight,” Holiday said. “Yeah, we tried to come here and get it. We know what happened last night. It’s the last game of our road trip, so we really wanted to go home on a good note, played hard and consistently throughout the whole game.”

He made 9 of 17 shots, including 4 of 5 3-pointers. That came a night after he took only seven shots and scored seven points against the Clippers.

“I thought his competitive edge on defense was really good,” Williams said. “We did a good job defensively, especially in the first half.”

For the second night in a row, the Pelicans’ revamped second unit played well, and this time the starters matched them — unlike Saturday.

“They’ve definitely been doing a better job,” said All-Star forward Anthony Davis (23 points on 11-of-15 shooting) of the reserves. “We (starters) have got to do a better job as well, or we put too much pressure on them right off the bat.”

In his third game with the Pelicans, forward Dante Cunningham continued to grow as a factor, especially defensively. Williams praised his work against Bryant and Nick Young, the Lakers’ two outside threats who shot a combined 9-of-31 from the field, including 2-of-11 from beyond the arc.

Ryan Anderson (11 points, 10 rebounds) and Alexis Ajinca (10 points in 10 minutes) were solid off the bench as well.

New backup point guard Gal Mekel allows Austin Rivers to play half his minutes off the ball, and Williams said he likes that look with the Pelicans minus Eric Gordon.

In the only true negative of the night, starting forward Luke Babbitt suffered what he termed “a slight left knee sprain” in the third quarter and didn’t return.

“I’ll be all right,” Babbitt said, although Williams said the 3-point specialist would undergo some tests back in New Orleans.

“We needed it,” Babbitt said of the victory, “especially after the way we played the last two games (against the Warriors and the Clippers). It wasn’t that we lost those two; it was how we played.”

Davis said he liked the ball movement, which has been inconsistent this season but was crisp Sunday.

“We shared the ball,” he said. “We played for each other. We defended.”