TORONTO, March 5 (Ticker) -- All-Star rookie Yao Ming's big fourth quarter helped make his first NBA visit to Canada a successful one.

NBA TV highlights from
56k | 300k
Yao scored 13 of his 21 points in the final quarter, including three free throws in the last 27 seconds, as the Houston Rockets ended a four-game losing streak with a 97-95 victory over the Toronto Raptors.

After Yao hit 1-of-2 foul shots with 2.1 seconds left, Toronto's Voshon Lenard took the long inbounds pass just inside the arc and took a turnaround jumper that went in-and-out.

With 2:25 to play, Yao sank his second straight hoop to tie the game at 88-88. With 27 seconds left, his two free throws gave the Rockets a 94-92 edge.

Steve Francis scored 19 points and Cuttino Mobley added 14 for the Rockets (31-30), who avoided falling below the .500 mark for the first time since losing their season opener.

"I have to thank my teammates for their faith in me, because I don't think I played that well in the first half and they continued to get me the ball in the second half," Yao said through an interpreter. "This kind of trust builds my own self-confidence."

The game took place in front of a crowd of 20,171, the largest at the Air Canada Centre this season.

"I'd like to thank all the fans for supporting me, and everybody for supporting me," Yao said. "I really love the fans."

Vince Carter, whose potential tying layup fell short with 10 seconds to play, scored 21 points, and Antonio Davis registered 19, eight rebounds and six assists while defending Yao.

"He (Yao) is strong," Davis said. "His legs are strong and you can't move him."

After Yao evened the game at 88-88, Lenard and Mobley exchanged baskets before James Posey's steal and layup gave the Rockets a 92-90 lead with 38 seconds left. Davis hit two free throws three seconds later to get Toronto even for the last time.

"We haven't been playing bad, but we just couldn't get a break," said Francis. "This is definitely a huge victory for us after losing four straight."

Toronto let a 47-40 halftime lead disappear but appeared to be taking command when Jerome Williams' basket with 1:55 to go in the third period provided a 71-62 advantage.

But a 10-0 run erased the deficit and gave the Rockets a 72-71 edge on Yao's 15-footer 57 seconds into the fourth quarter.

Neither team was able to open more than a two-point lead until Alvin Williams' free throws with 3:30 remaining put Toronto on top, 88-84.

"It was a heck of an effort and a fun game to be a part of, the way it went back and forth," Carter said.

Carter liked the looks of Lenard's last shot.

"We should still be playing. It looked good when it left his hand," Carter said.

Posey scored 13 points and Maurice Taylor and Eddie Griffin each added 12 for the Rockets, who shot 48 percent (42-of-88) from the field and held a 44-39 rebounding advantage. Griffin had 12 boards and Yao nine.

The Rockets trail Phoenix by 1 1/2 games in the fight for the final playoff spot in the West.

"We're in survival mode, fighting for a playoff spot," Rocket coach Rudy Tomjanovich said. "We've had a lot of games (like) tonight. We lost some, we just had to have this."

Lenard scored 15 points and Jerome Williams had 14 and 10 rebounds for the Raptors, who fell to 9-6 since Carter came off the injured list.