Joel Embiid scored and rebounded. He blocked shots and even threw the most important pass of the game.

The only thing he didn't do is lose his cool after his hard foul triggered a scuffle.

After having to sit out the last game, there was no way Embiid was going to risk an ejection and miss his chance to help the 76ers seize control of the series.

Embiid had 31 points and 16 rebounds, and he passed to Mike Scott for the go-ahead three-pointer with 18 seconds left as Philadelphia beat the host Nets 112-108 on Saturday to take a 3-1 series lead.

Embiid also had a flagrant foul that led to a scuffle and two ejections during an eventful return to the lineup after missing Game 3 with a sore left knee.

"I know these guys are going to go at me because they want me to retaliate, so I've got to be mature when I'm on the court and just stay cool and not react," Embiid said.

Tobias Harris had 24 points, eight rebounds and six assists for the 76ers. They can advance to the Eastern Conference semifinals for the second straight season with a victory at home Tuesday.

Embiid helped the 76ers overcome the loss of Jimmy Butler, who was ejected in the third quarter after Embiid's hard foul on Jarrett Allen.

Even that ended up working out for the 76ers. Scott took what probably would have been Butler's position on the floor in the final seconds and turned Embiid's seventh assist into the go-ahead basket.

Embiid also had six blocked shots.

"Just look at the magnitude of what the numbers say, the influence that the numbers say that he must have had on the game," Sixers coach Brett Brown said. "He was dominant."

Dudley was inserted into the starting lineup for the Nets and had been agitating the 76ers with his defense and his talking, but he was gone midway through the third quarter as one of the central figures in the scuffle that spilled into the stands.

Embiid swung his arm forcefully while fouling Allen, and Dudley quickly moved in and bumped Embiid. Butler then ran in and pushed Dudley. Dudley, Simmons and referee Ed Malloy all got knocked into the seats, and after a lengthy video review, Butler and Dudley were given technical fouls and ejected, and Embiid's foul was ruled a flagrant 1.

Dudley said he was trying to send a message. The Nets have been upset over an elbow Embiid hit Allen with in Game 2 that they felt should have led to ejection, and were further angered after Embiid laughed as he apologized in his news conference.

"When you have a guy giving flagrant fouls, I mean Joel Embiid is second in the league in flagrant fouls," Dudley said. "So for that elbow he had before just to have [been] a flagrant 1, no fine, no nothing, laughing in the media, if you think that a team that I play on is going to have [to accept] that, that's another thing coming."

Houston 104, Utah 101: James Harden went just 3-for-20 for 22 points, but the Rockets still defeated the host Jazz to take a 3-0 series lead.

Utah's Donovan Mitchell, who scored a game-high 34 points, missed a three-pointer that would have tied it with less than 10 seconds left.

Game 4 is Monday in Utah.

Denver 117, San Antonio 103: Nikola Jokic had 29 points and 12 rebounds, Jamal Murray added 24 points and the visiting Nuggets beat the Spurs to tie the first-round series 2-2.

The Spurs' DeMar DeRozan had 19 points before he was ejected with five minutes remaining after arguing with an official over an offensive foul.

Game 5 is Tuesday in Denver.

Milwaukee 119, Detroit 103: Khris Middleton had 20 points and nine rebounds and the Bucks beat the host Pistons to take a 3-0 lead in the first-round series.

The Bucks can finish the series Monday in Detroit after winning the first three games by an average of 24 points.

Detroit's Blake Griffin had 27 points, seven rebounds and six assists in his return from a knee injury that kept him out of Game 1 and Game 2.