The Orlando Magic thought their loss earlier in the week to the Utah Jazz was bad.

What transpired Friday night felt even worse.

The Magic displayed the same sloppiness. They continued to miss free throws. They barely played any defense against a team that doesn't have a single star player on its roster.

The lowly Toronto Raptors -- the same Toronto Raptors who had won just once all season -- stunned the Magic 110-106 at Amway Center.

"After losing to Utah, you would think we would come out with a different attitude," Rashard Lewis said.

They didn't.

And it proved costly.

Toronto's Sonny Weems hit a 3-pointer over Dwight Howard with 7.1 seconds left to break a 103-103 tie.

On the ensuing Orlando possession, Jose Calderon intercepted Mickael Pietrus' inbounds pass after Howard failed to set a key screen that might freed up a teammate. The botched play broke the Magic's backs and gave the Raptors a rare victory.

"Finally, after all these losses, it feels good to win again," said Raptors big man Andrea Bargnani, who scored a game-high 27 points.

Sure, the Raptors made key shots, but in reality, the Magic only have themselves to blame.

Toronto has a reputation as an atrocious defensive team, but Orlando looked just as awful during the first three and a half quarters. You would have been forgiven if you thought someone had disguised the Washington Generals as Magic players.

"I just think it looks like we can't make the plays defensively, like people are just too quick for us," Magic coach Stan Van Gundy said.

Van Gundy blamed himself, too.

He faulted himself for assigning Howard to guard Weems with the score tied at 103.

Van Gundy also said he put Pietrus in a rough position on the inbounds play that followed. Vince Carter and Quentin Richardson have more experience in that kind of situation than Pietrus, who had kept the Magic in the game with 24 points.

Howard scored 25 points, but he also missed 10 of his 17 free-throw attempts.

"We're glad it's early in the season," Howard said. "We're gonna make mistakes and we're gonna lose games here and there. But I think they just outplayed us and they played harder than us. It has nothing to do with defense or offense. They just outworked us."

The game felt like an unrelenting seesaw ride, with both teams scoring at will early on and trading the lead over and over and over again.

On a few occasions, Orlando made a basket, but then the Raptors' offense beat the Magic's defense down the floor, resulting in easy buckets.

The Magic also made some ill-advised defensive rotations.

Late in the first quarter, Toronto's Jarrett Jack dribbled toward the right corner, prompting Howard to leave his spot in the paint. Jack sent a bounce pass into the lane, where it caught Amir Johnson perfectly in stride. Johnson slammed home an easy dunk to tie the score at 22.

Van Gundy immediately called a timeout and yelled as his players huddled around him.

Little changed.

Bargnani still did his best impersonation of Dirk Nowitzki.

Bargnani swished a trey. He drained midrange jumpers with ease. He slammed home a pair of dunks.

Lewis couldn't slow Bargnani down.

Van Gundy eventually turned to Brandon Bass, who fared better.

Five other Raptors players scored in double figures, including DeMar DeRozan, who had 26 points.

"I think tonight we put everything together," DeRozan said. "We played a full 48-minute game. We held Dwight to a level where he didn't get off."

Howard picked up his fifth technical foul of the season midway through the third quarter after he had picked up an offensive foul. He explained after the game that he had been talking to another player, not to a referee.

Still, the technical call was a frustrating moment on a frustrating night for everyone.

"It was defense, rebounding and taking care of the ball," Van Gundy said. "It's the same old story."

Read Josh Robbins' blog at OrlandoSentinel.com/magicblog and e-mail him at jrobbins@orlandosentinel.com. Subscribe to our Orlando Magic newsletter at OrlandoSentinel.com/joinus.