Wednesday night's Golden State Warriors-Dallas Mavericks contest had some controversy, and Luka Doncic made his feelings known.

After a timeout in the third quarter, the Mavericks thought that they had possession of the ball, so the five players on the court went on one side of the court. However, it was actually Golden State's ball.

With the two teams on opposite ends of the court, the referee gave the ball to Warriors' Jordan Poole, inbounding underneath his own basket with no Mavericks around them.

CLICK HERE FOR MORE SPORTS COVERAGE ON foxnews.1eye.us

Luka Doncic head shot

Luka Doncic, #77 of the Dallas Mavericks, reacts on the court in the second half against the Golden State Warriors at American Airlines Center on March 22, 2023, in Dallas, Texas.  (Tim Heitman/Getty Images)

Poole bounced a pass to Kevon Looney, who dunked it with no issues. 

The Mavs lost the game, 127-125.

Doncic, along with other Mavs, was also getting hacked throughout the night to little whistles.

Doncic shared his displeasure toward the end of the game, signaling that the refs were being paid.

Well, that "inappropriate and unprofessional" gesture cost the superstar $35,000.

Doncic made the gesture with 1.7 seconds remaining in the game, shortly after he missed a contested layup that could have cut the deficit to a point.

The aforementioned free basket resulted in Dallas filing a protest for the game, as team owner Mark Cuban claimed the refs never had notified his team that it had been Golden State's ball.

Luka and Steph

Luka Doncic, #77 of the Dallas Mavericks, dribbles the ball against Stephen Curry, #30 of the Golden State Warriors, on March 22, 2023, at the American Airlines Center in Dallas, Texas.  ((Photo by Cooper Neill/NBAE via Getty Images))

NIKOLA JOKIC IS 'TURNED OFF' BY 'NASTY' MVP DEBATE, NUGGETS COACH MICHAEL MALONE SAYS

"For those wondering about the play with 1:54 to go on the 3rd, let me explain what happened," Cuban tweeted after the game. "The ref called Mavs ball. The announcer announced it. Then there was a timeout. During the time out the official changed the call and never told us. Then when they saw us line up as if it were our ball, he just gave the ball to the warriors. Never said a word to us They got an easy basketball. Crazy that it would matter in a 2 point game. Worst officiating non call mistake possibly in the history of the NBA. All they had to do was tell us and they didn't."

The Mavs were able to lead 117-115 with 3:52 to go, but Golden State pulled away late to clinch the road victory.

Luka and Klay

Luka Doncic, #77 of the Dallas Mavericks, and Klay Thompson, #11 of the Golden State Warriors, battle for position in the first half at American Airlines Center on March 22, 2023, in Dallas, Texas.

CLICK HERE TO GET THE FOX NEWS APP

The two teams were separated by a half-game in the playoff race entering Wednesday. With the win, the Warriors, for now, are the sixth seed, while the Mavs are the ninth seed, requiring a play-in tournament appearance. The top six automatically make the playoffs.