After leading by 18 points in the first half, the Los Angeles Lakers were staring at a four-point deficit with less than two minutes to play.

Metta World Peace wasn't worried about losing. He was trying to figure out how much the Lakers would win by. Having Kobe Bryant as a teammate gives you that kind of confidence.

Bryant hit a baseline jump shot with 4.2 seconds left and the Lakers wrapped up a six-game road trip by holding on to beat the Raptors 94-92 on Sunday, their eighth victory in nine meetings with Toronto.

"When you've got a guy like Kobe Bryant, you're always going to give yourself a chance," Lakers coach Mike Brown said.

Bryant, who scored 27 points, took an inbound pass from World Peace, evaded DeMar DeRozan and shot over the outstretched arms of James Johnson to deny the Raptors.

"I just noticed a spot open on the baseline," Bryant said. "Everything was set for me to try and catch it down there because I knew I could catch and shoot. If I go to the top of the floor the defense can kind of key on me and I'm far away from the basket. Once I noticed that space open it was just a matter of me trying to shake DeRozan and get to that spot."

Pau Gasol had 16 points and 17 rebounds and Andrew Bynum scored 14 for the Lakers, who went 3-3 on the road trip. Sunday's win was just the fifth road victory for the Lakers in 15 games away from Staples Center.

"We're a poor road team, and that's what we need to turn around," Bryant said. "If we could figure out a way to win games on the road, our record would be much, much better."

Bryant's late-game scoring came as no surprise to World Peace, who approached Brown with just over a minute to go and volunteered to guard the Raptors' Jose Calderon, who scored a career-best 30. Brown turned the offer down.

Brown said World Peace then told him, "You know what? You're right. There's still time on the clock. We're fine. We'll win by ... uh."

"I said, 'Don't worry how much we'll win by, let's just win,'" Brown said.

Bryant made sure they did by hitting a 3, then forcing a steal and feeding World Peace for a driving layup to erase Toronto's lead. After Calderon made a jumper, Bryant responded with his game-winning shot from the baseline.

"The bottom line is Kobe's two shots at the end of the game," Brown said. "The 3 was big for us and obviously the shot he took along the baseline. That's who he is. If we're in a one-point game or a two-point game, the ball is going to be in his hands and we're going to expect him to make a play and he did that tonight."

Down 93-92, Toronto blew its best chance at a winning shot when Rasual Butler couldn't inbound the ball and failed to call a timeout before five seconds had elapsed. Bryant made one of two from the line to put the Lakers up by two with 3.7 seconds left.

"I asked (referee Scott Foster) to count out loud and he did," Butler said. "I heard four, I turned to call a timeout and he felt like it was five seconds."

Butler had not played in the game until that point, but Raptors coach Dwane Casey said he turned to him because the veteran is Toronto's "best inbounds passer."

"What teams normally do is put their longest guy on the ball," Casey explained, "and that's why we put Rasual up there."

Calderon inbounded to DeRozan on the final possession, but he airballed his potential game-tying shot at the buzzer.

Linas Kleiza scored 15 points and Leandro Barbosa had 12 for the Raptors, who lost for the seventh time in 10 games.

Calderon hit two 3-pointers with less than 5 minutes left to tie the score at 84-84. After a missed jumper by Bryant, DeRozan fed Ed Davis for a fast break dunk, giving Toronto its first lead. Bryant missed again before Kleiza made a driving hook shot, putting the Raptors up 88-84 with 2:12 remaining.

The Raptors led 90-86 with just over a minute left and had a chance to extend the lead. Kleiza missed a 3-pointer and the ball went out of bounds, with Toronto initially awarded possession.

But a video review gave the ball to the Lakers, and Bryant made the most of it with his key 3-pointer.

NOTES: Calderon's previous career high was 27 against San Antonio on Feb. 11, 2008. He finished with 13 made field goals, also a career high. ... The Lakers scored a season-high 34 points in the first quarter. ... Gasol led Los Angeles with six assists. ... DeRozan had a career-high seven assists for Toronto. ... Andrea Bargnani, who sat for the 16th time in 18 games Sunday with a strained left calf, has been doing plenty of pool work in his rehab. "His new nickname is Flipper," Casey joked, adding that Bargnani will increase his workload this week to include weight-bearing exercise. There's still no timetable for the return of Toronto's leading scorer. ... Toronto Maple Leafs players Dion Phaneuf and James Reimer attended the game.