The Dallas Mavericks pulled off one of the strangest plays you'll ever see in an NBA game on Wednesday against the Golden State Warriors. Apparently, there was a method behind the madness — and the Mavs aren't at all happy with how things went down.

Before anything else, here is the exact play in question:

That's a pretty bonehead play, right? Well, apparently, the Mavs did not play defense because they thought it was supposed to be their ball. Dallas team owner Mark Cuban best explained the mix-up in an understandably triggered tweet:

“For those wondering about the play with 1:54 to go on the 3rd, let me explain what happened. 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,” Cuban wrote in his tweet.

To make matters worse, the Mavs ended up losing the game — by two points. So much happened between the above play and the final buzzer, but it's very much possible that the outcome of the game would have been different had it not been for this incident.

The Mavs are not letting this go. NBA guru Shams Charania reported after the game that Dallas intends to take this up with the NBA via a formal complaint:

The Dallas Mavericks plan to file to the NBA a formal protest of their 127-125 loss to the Golden State Warriors tonight, with focus on alleged referee mistake that led to two free Warriors points late in the third quarter, source tells @TheAthletic @Stadium,” Shams wrote in his tweet. 

Cuban himself confirmed their intention to bring this issue to the league. In the end, however, it's very, very unlikely that this is going to change the result of the game. The Warriors win, 127-125.