The NBA has fined the Houston Rockets' Dillon Brooks and head coach Ime Udoka for their public criticism of referees after they were both ejected Sunday.

Brooks was ordered to pay a $35,000 fine, while Udoka, who was also ejected earlier this month after getting into a confrontation with LeBron James, was fined $25,000.

The league said the two "direct[ed] inappropriate language toward a game official and publicly criticiz(ed) the officiating."

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Dillon Brooks and Ime Udoka

Ime Udoka, head coach of the Houston Rockets, confers with Dillon Brooks (9) in the second half of an NBA game at Frost Bank Center Oct. 27, 2023, in San Antonio.  (Ronald Cortes/Getty Images)

Both were ejected with about 38 seconds remaining in a game against the Milwaukee Bucks after arguing a flopping call on Brooks. Houston lost the game, 128-119.

Brooks said referees missed a call and resorted to calling a flop on Brooks. 

Brooks and Khris Middleton were both chasing after the ball, but it seemed like Brooks wanted a foul called on the Buck. Brooks was assessed his second technical foul, prompting an automatic ejection.

"I'm sick of refs being right in front of the play and not making calls and then compiling it with a bailout call like a flop," Brooks said after the game. "I ran full speed to get the ball after I made a great play on trying to get a steal. Two hands are on me. After that, I'm throwing the ball and trying to protect myself and not falling into whatever that was — into the fans or the bottom of the floor.

LeBron James and Ime Udoka spat

An NBA official separates Los Angeles Lakers forward LeBron James (23) and Houston Rockets head coach Ime Udoka during the second half at Crypto.com Arena in Los Angeles Dec. 2, 2023. (Gary A. Vasquez/USA Today Sports)

JA MORANT HITS GAME-WINNER AT BUZZER IN RETURN FROM 25-GAME SUSPENSION

"I'm trying to protect myself, and then, on top of that, he wants to call a flop with a minute left. That doesn't make sense. Make calls during the game while the game is going on, but not trying to get something off. It's unacceptable for me. That ref shouldn't even be reffing our games, for real."

DILLON brooks with ref

Dillon Brooks (9) of the Houston Rockets argues with referee Pat Fraher during the second quarter against the Cleveland Cavaliers at Rocket Mortgage Fieldhouse Dec. 18, 2023, in Cleveland.  (Jason Miller/Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

Brooks has nine technicals this season, the most in the NBA. He trailed only Draymond Green in that category last season.

Follow Fox News Digital’s sports coverage on X and subscribe to the Fox News Sports Huddle newsletter.