Toronto rookie Jonas Valanciunas was a big bright spot on an otherwise messy night that left Raptors coach Dwane Casey issuing an apology to Dr. James Naismith.

And that’s good news for a team that has pegged the young Lithuanian centre as a big piece of the future of the franchise.

DeMar DeRozan scored 14 points while Ed Davis had 12 in the Raptors’ 82-75 preseason victory over the Detroit Pistons on Friday.

But almost all eyes were on Valanciunas, who had 11 points and eight rebounds, and scored on a key possession with less than a minute to play, in just his second NBA game.

“I’m happy, I’m happy because we won the game,” the rookie said afterward. “I like the crowd, how they support us, that was wonderful. That was a great day for me.”

Rodney Stuckey topped the Pistons with 14 points, while Vyacheslav Kravstov had 10.

Valanciunas, who the Raptors selected with their No. 5 in the 2011 NBA draft, put in an energetic 29 minutes, banging with Detroit’s big men under the glass. On one play late in the first quarter, the rookie did a nice job of driving to the hoop and drawing a foul for a three-point play.

Then with 48 seconds left in the game, and the Raptors up by three, Valanciunas drove to the basket and finished with a pretty hook shot.

When a reported jokingly asked if he had recently perfected that move, the Lithuanian smiled and said: “Yeah. This morning.”

“I thought it was a good run by Jonas, he came in and battled, competing in the paint, had some good offensive moves,” said Casey.

The Raptors never led by more than 10 points on a sloppy night indicative of preseason basketball. Casey issued an apology to Naismith in the post-game news conference saying:

“I apologize for our display. But I thought our guys battled, the effort was there, we have not had a day off, and we played like it.

“But that’s the way it’s going to be if you’re play for something. You’re going to be tired, you have to play through fatigue, if you’re going to play for something.”

Toronto took a four-point lead into the fourth quarter in front of an Air Canada Centre crowd of 10,167, but trailed by one before rookie Terrence Ross drained a three with 3:41 to go. The Raptors barely looked back, Valanciunas’s late basket sealing the victory.

Casey preached patience with the 20-year-old, who was sidelined for Toronto’s training camp last week in Halifax with a strained calf muscle and then played just 13 minutes in his NBA debut on Wednesday — a 101-99 loss to the Pistons in Detroit.

Casey said the Lithuanian’s presence on the court Friday was more “for conditioning than anything else,” and that he would play until he “gets tired or gets in foul trouble, whichever comes first.”

Turns out it was neither, although Valanciunas, who played in a black protective sleeve that covered his leg from ankle to mid-thigh, was breathing heavily when he took a seat midway through the third quarter.

“Man, I was tired a little bit because that my third practice, I had just two practices before, but I’m getting back in shape. It’s going to be all right,” he said. “I feel good, a little bit tired, but (Saturday) we have a day off, I’m going to rest, take care of my body.”

Valanciunas finished with three fouls.

Casey said fouling will be the biggest challenge he’ll face this season as he adjusts to the NBA game.

“One thing I did tell him was to learn the officials’ names, so when he talks to them he doesn’t say, ‘Hey ref,“’ Casey said. “Learn their name and get to know them. . . I found that officials want to help young guys, if you go and approach them the right way and ask them in the right way, they’ll answer your question.”

Starting point guard Jose Calderon left Friday’s game in the third quarter with tightness in his left hamstring.

Newly acquired guard Kyle Lowry has yet to play this pre-season. Lowry is sidelined with a strained adductor — groin — muscle in his left leg.

Valanciunas and DeRozan had five points apiece in a sloppy first quarter that saw the Raptors commit eight turnovers. The Pistons took a 21-17 lead into the second.

Davis had 10 points and four boards in the second, and his tip shot put Toronto up by 10 points with just over five minutes left in the half. The Raptors were up 39-34 at halftime.

The Pistons pulled within two points several times in the third quarter, but the Raptors held on to take a 58-54 lead with a quarter left.

NOTES: Toronto hosts the Washington Wizards on Wednesday. . . The Raptors open the regular season on Halloween against the visiting Indiana Pacers.