Wesley Matthews just made a whole lot of enemies in the betting community.

Wednesday night’s game at TD Garden went great for the Boston Celtics — the undermanned C’s rallied in the fourth quarter to beat the Dallas Mavericks 97-90 and improve to an NBA-best 22-4.

But for those who bet on Boston as a 7.5-point favorite? Not as much.

Here’s how it went down: The Celtics led by 10 points with a minute remaining when Terry Rozier missed a free throw. Fine. Harrison Barnes and Matthews clanked 3-pointers on Dallas’ next two possessions, so Boston got the ball back with 28.5 seconds remaining and a 10-point lead. Still safe, right?

It was, until the Celtics opted to play nice and take a 24-second shot clock violation rather than run up the score. That meant the Mavs would have the ball for five more utterly meaningless seconds. You probably can guess how this story ends.

That’s right: Matthews buried an uncontested 3-pointer at the buzzer, somehow helping Dallas cover and lose by just seven points. Brutal.

So, how many people lost money on Matthews’ meaningless buzzer-beater? Well, we know someone at TD Garden who did. Check out the guy in the light blue shirt just behind the Celtics’ bench, who literally drops to his knees in horror as the shot goes in:

We feel your pain, man.

The C’s head to San Antonio on Friday for a tough matchup against the Spurs. Wager at your own risk, folks.

Thumbnail photo via Winslow Townson/USA TODAY Sports Images