TORONTO, April 14 (Ticker) -- Mike James refused to let the Toronto Raptors lose to the Detroit Pistons' reserves.

James scored 20 of his career-high 39 points in the fourth quarter as the Raptors ended their 10-game losing streak with a 108-103 victory over the Pistons.

NBA TV highlights from
Behind the effort of James, who made 9-of-16 shots and all 18 free throws, Toronto beat Detroit for the first time in four tries this season.

"Whatever it takes to help my team win," James said. "I'm just thankful that we were able to pull one out tonight. Even though they rested their starters they're still a good team."

Morris Peterson scored 20 points and rookie Charlie Villanueva added 15 and four steals for Toronto (27-53), which won for the first time since a 97-77 triumph over Minnesota on March 24.

"It is definitely is a relief to get a win when we've been playing hard and coming up short." Peterson said. "Mike (James) was unconscious in the fourth quarter, but he's been doing that all year, making big plays and big baskets."

Behind their starters, the Pistons held a 76-70 lead after three quarters. But the league-leading Pistons went to their bench in the final period, enabling the Raptors to rally.

"Our main guys played really well in the third quarter," Pistons coach Flip Saunders said. "Then we gave our young guys some fourth quarter experience against a team trying to get a win after losing 10 straight. It would have been better if they would have got the win but overall they did some good things and got some good experience in a close game."

James hit two 3-pointers and scored eight points in a 14-2 burst that gave Toronto a 96-90 edge with 2:40 remaining.

Lindsey Hunter, who scored 13 points, made a layup and a 3-pointer to pull the Pistons within 96-95 with 88 seconds left. But James made eight free throws down the stretch as the Raptors held on.

Richard Hamilton scored 16 points and fellow All-Star Chauncey Billups added 15 and 10 assists for Detroit (63-16), which is one win shy of setting a franchise record. The backcourt duo did not play in the final quarter.

"A franchise record doesn't mean anything to us," Hamilton said. "We are just thinking about winning a championship."

James set a franchise record with his perfect performance from the line.

"You've got to step up there and knock down shots, that's what it's all about," James said. "In that situation you can't feel any fear you just have to block everything out and go up there and shoot, just like you do in practice."