ORLANDO (NBA.com Exclusive) -  --  Charlie Villanueva's fourth-quarter explosion didn't get Detroit a victory Friday night, but it did illustrate what pests the Pistons have become to the Orlando Magic, even when they lose.

Villanueva scored 22 of his game-high 28 points in the final period, enough for the Pistons (2-4) to put a scare into the Magic in the final minutes of a 110-103 victory that felt more like a loss.

"I thought we had too many minutes when we were just trying to hang on and win a regular-season game," said coach Stan Van Gundy.

"We have to do a better job of keeping people off the line," said J.J.

Redick, one of four Magic starters to finish the game in foul trouble.

"That's been a problem for us all year, admittedly. Guys are shooting way too many free throws against us."

Fortunately for the Magic (5-1), the Pistons missed 14 of their 37 attempts from the line, which might have saved the Magic.

Dwight Howard led the Magic with 22 points and 12 rebounds before fouling out in the final seconds.

"I'm proud of our guys," said Detroit coach John Kuester. "This could have easily been one of those nights where we just give up and don't compete, but that isn't us. We competed."

It was only the Magic's fifth victory in 25 games against the Pistons (including playoffs) since the beginning of the 2006-07 season. Even on their way to a 59-win season and a trip to the NBA Finals last season, the Magic lost all three of their games against the Pistons.

The Pistons played Friday night without Tayshaun Price, who missed a third straight game with a lower back strain, and Richard Hamilton, who has been out since the season opener with a sprained right ankle.

Magic forward Ryan Anderson left the game in the third quarter with an ankle injury.

The Magic made their first six shots and their first five 3-point shots, breaking out to a 17-point lead in the first quarter.

"That was the game right there," said Piston guard Rodney Stuckey. "If we had been able to hold them in the first quarter, we would have won this game."

Stuckey and rookie Austin Daye got the Pistons back in the game before the end of the first half, and Villanueva took over in the fourth quarter.

"He was cookin'," said Magic forward Matt Barnes. "I don't think the best defender in the world could have stopped him. I was right on him, hand in his face every single time. But by the time I was on him he was hot so there was nothing I could do. I couldn't really foul him to take him out of rhythm because I had four or five fouls, so I just played the best defense I could.

"He was hitting fadeaways, jump hooks, 3-pointers, jump shots; he gave us his whole package there in the fourth quarter."

Villanueva, whose season high for a game had been 16 points, made his first seven shots of the fourth quarter as the Pistons staged a big run at the Magic, reducing the lead to 96-90 with almost three minutes left.

Barnes then scored six points on an 8-3 Magic answer that stretched Orlando's lead to 104-93 with 1:08 left.

"We had to keep trying to overcome that big lead we created for ourselves in the first quarter," said Ben Gordon. "We just couldn't get over the hump."

With a block of a Ben Gordon layup late in the first quarter, the 23-year-old Howard became the Magic's all-time leader with 825 blocked shots. Shaquille O'Neal blocked 824 in his four years in Orlando.

Vince Carter, who has not missed more than six games in any of the last five seasons, sat out his third game of this season with a sprained right ankle.