NBA veteran Harrison Barnes reportedly knew he was on the verge of being traded -- but judging by his on-camera reaction, he didn't expect it the deal to go through in the middle of a game.

Since the Dallas Mavericks were in the middle of a game against the Charlotte Hornets when the trade with the Sacramento Kings was announced, Barnes awkwardly was forced to sit in basketball purgatory for the rest of the game: warming the bench for a team he was no longer a part of...but that he was still technically a member of.

Cameras caught Barnes, 26, sitting on the bench in the fourth quarter Wednesday, and his surprised reaction was widely shared on social media.

The forward was seen on the floor for a few moments after the game ended, chatting with a few Hornets players before walking through a throng of fans he wanted to say goodbye to the seventh-year player.

WASHINGTON WIZARDS STAR JOHN WALL’S GRUESOME ACHILLES INJURY UPDATE DRAWS RESPONSE FROM NBA FANS

Barnes was traded for Kings forwards Zach Randolph and Justin Jackson.

Basketball fans and NBA superstars, such as LeBron James, took to social media to address the Barnes swap.

James posted a video of Barnes’s reaction and wrote: “So let me guess this is cool cause they had to do what was best for the franchise right??? Traded this man while he was literally playing in the game and had ZERO idea. I’m not knocking who traded him because it’s a business and you have to do what you feel what’s best but I just want this narrative to start to get REAL/CHANGE and not when a player wants to be traded or leaves a franchise that he’s a selfish/ungrateful player but when they trade you, release, waive, etc etc it’s best for them! I’m OK with both honestly. Truly am.”

ANTHONY DAVIS’ DAD SAYS HE DOESN’T WANT SON PLAYING ON BOSTON CELTICS

Barnes released a statement Wednesday night thanking the Mavericks organization.

“I will never forget how the incredible fans in this city held it down at AAC every game, win or lose. Excited for the next chapter @Sacramento Kings,” Barnes wrote.