It was the team's first win at the Ford Center in 47 days.
"Desmond said he thought they were going to bring us hats with a 3 on them for our third win of the year," said Nick Collison, who had two crucial offensive rebounds down the stretch.
"It felt like that. With the season we've had, who cares? Let's celebrate tonight."
Toronto erased a nine-point fourth-quarter deficit before Durant hit a tiebreaking 3-pointer from the left wing with 3:36 to play, and the Thunder's young core avoided the kind of late mistakes that have dogged them all season to improve to 3-24.
"The difference tonight was guys made plays instead of standing around and seeing what was going to happen," Collison said. "We didn't just stand around and wait for something bad to happen. We made good things happen."
Collison had the most memorable moment, diving on the floor to rip the ball away from Chris Bosh and set up a jumper by Westbrook that extended the lead to 85-81. Jeff Green followed that with an exclamation-point dunk with 33.8 seconds left for a six-point lead, and that cemented the win.
Bosh led the Raptors with 22 points and 16 rebounds for his 13th double-double, but he didn't have enough help after Jermaine O'Neal missed the second half with a sore left shoulder. Andrea Bargnani took the place of the injured six-time All-Star, who said he expected to play Saturday night at San Antonio, and finished with 16 points off the bench.
"We were right there the whole game. We just couldn't finish," Toronto point guard Jose Calderon said. "We have to keep working and believing in our team. I know it is tough.
"This wasn't our best game. It was one of our worst."
Scott Brooks, the Thunder's interim coach, shuffled his lineup by re-inserting Collison in place of 7-footer Johan Petro and giving the veteran Mason only his second start -- with the other coming only because Durant was injured. The result was the team's best defensive performance of the season.
Toronto shot only 36 percent, including another rough performance by Bosh -- who was 6-for-18 and is 22-for-70 during the Raptors' four-game losing streak.
"There's times where guys hit shots with good defense and there's times when you don't contest and they miss shots," Brooks said. "Tonight, we made them miss."
The Thunder took an early 14-5 lead when Durant capped a 12-0 run with a 3-pointer from the left wing, and the advantage grew to 13 when Westbrook converted a three-point play after getting fouled on a jumper.
Toronto slowly chipped away from there, and finally got within striking distance as the Thunder misfired on six of their first seven possessions of the final period.
Bosh cut the deficit to 73-72 when he drove past Joe Smith from the right wing for a layup, and his wide-open layup tied it at 76 with 4:38 to play.
Durant fired in a 3-pointer to break the tie and then blocked Anthony Parker's shot at the tie at the other end, and the Raptors -- who are 1-13 when trailing after three quarters -- couldn't pull even again.
Green finished with 13 points, Collison had 10 points and nine rebounds and Mason added seven points and 10 rebounds.
"It's good to be up here and not talk about the broken record that we've been talking about," said Brooks, who is 2-12 since taking over for P.J. Carlesimo.
"There's plenty of times I wanted to change the subject and talk about OU football."
Mason's only other start of the season came in a 109-92 loss to Orlando on Nov. 12, when Durant was out with a sore left ankle. ... The Raptors, who came in with an NBA-record 803 straight games with a 3-pointer, were 0-for-8 before Jamario Moon's make with 3:12 left in the third quarter. ... Thunder F Chris Wilcox, playing with his dislocated left ring finger taped to his middle finger, missed four straight free throws in an 18-second span in the first half.