Instead, they let a close one slip away and fell deeper into frustration.
"We needed this one," Suns forward Luis Scola said. "We were close, we just couldn't finish."
Having lost three of four, including Wednesday's lopsided 117-77 defeat to the Pistons, the Suns were a sullen bunch after being beaten by Toronto.
Scola suggested an attitude adjustment was in order for his struggling club.
"We need to change the dynamic, we need to change our attitude, we need to change our minds," he said. "We're in the kind of dynamic where everything goes wrong. We just can't get it going.
"We need to start thinking like a winning team. We need to start believing in ourselves and winning games."
Attitude wasn't a problem for the Raptors, who celebrated their first win since a Nov. 18 victory over Orlando. Toronto lost a pair of one-point games and dropped a double overtime decision during its skid, but held on in this one.
"I feel great," Calderon said. "We showed ourselves that we can win these types of games."
"These last two games hurt just because it's teams you think you can beat," Dudley said.
Still, coming close felt better than another big blowout.
"If you ask me which loss I think is worse, this one or Detroit, I would say Detroit," Dudley said. "When you're losing by 40, it's embarrassing. When you lose by one or two, it's execution."
Phoenix coach Alvin Gentry was happier with his team's response following the rout, the third largest margin of defeat in Suns history.
"I thought we played with much, much better effort, obviously, than we did in our last game," Gentry said. "I was happy because I thought we got good ball movement."
The problem was, Phoenix couldn't get a shot to fall when it needed it most. The Suns had four chances to tie or take the lead inside the final 36 seconds, but missed all four shots.
"We just didn't make the plays down the stretch that get you over the hump," Gentry said.
Scola scored the first basket of the fourth quarter, but the Raptors answered with a 7-0 run -- including five points from Johnson -- to lead 87-78 with 9:04 left.
A 3 by Calderon made it 92-85 with 6:54 remaining before back-to-back baskets by Scola cut it to 92-89. Mickael Pietrus, in his Raptors debut, made a 3 from the corner before Sebastian Telfair and Jermaine O'Neal answered for the Suns to make it 95-93 with 3:53 to go.
Phoenix trailed 96-95 with just under two minutes left when Dragic committed a turnover. Johnson finished the breakaway with a running dunk, putting the Raptors ahead by three points.
Brown's layup made it 98-97 with 1:07 left, but the Suns couldn't keep it up. After Scola sandwiched missed shots around a failed tip shot by Gortat, Lowry grabbed the rebound on Scola's second miss and was fouled. He made one of two from the line to put Toronto up 99-97 with 14 seconds to play.
Brown tried to drive for the tying basket but missed a layup. Andrea Bargnani was fouled as he went for the rebound and sealed the win by making two free throws with 3 seconds left.
After trailing by as many as 10 points in the first quarter, Toronto went ahead for the first time on a breakaway dunk by Terrence Ross at 6:42 of the second. Johnson followed with a running dunk, putting the Raptors up 40-36.
Dudley scored 11 points in the second to put the Suns back on top, but Lowry's 3 pointer at the buzzer got the Raptors within 52-51 at halftime.
Beasley scored eight points in the third quarter, but DeRozan rebounded his own blocked shot and made a buzzer-beating jumper. He then converted the free throw to put Toronto up 80-76 heading into the fourth.
After signing with Toronto earlier Friday, Pietrus had six points and two rebounds in 30 minutes.
Bargnani returned to Toronto's lineup after sitting out Wednesday's loss at Memphis because of a sore left ankle. ... After losing 14 straight to the Suns, the Raptors have won consecutive games against Phoenix. ... Toronto waived F Dominic McGuire to make room on the roster for Pietrus. ... Singer Drake watched from a courtside seat. ... Toronto's losing streak was the longest current skid in the NBA. ... The Raptors won for the first time this season when trailing after the first quarter.