BOSTON – Doc Rivers decided not to tell his team that Carmelo Anthony was scratched until after the Celtics already had prepared to face the star of the Denver Nuggets.

He learned that lesson from Oklahoma City and Kevin Durant.

“(Rivers) really didn’t want to tell us that Carmelo wasn’t playing,” Celtics forward Paul Pierce said after Boston beat the Nuggets 105-89 Wednesday night. “I think he waited to the very last second.”

Ray Allen scored 28 points to help the Celtics take advantage of Anthony’s injury and win their eighth straight game. The loss left Nuggets Coach George Karl stuck on 999 wins; his next chance to reach 1,000 comes Friday at Toronto.

Kevin Garnett had 17 points and nine rebounds, and Rajon Rondo added 13 assists for Boston. Pierce scored 17 and Glen Davis, who was ill earlier in the week, had 16 points.

Reserve guard Ty Lawson scored 24 for Denver, and Arron Afflalo added 16 points. Gary Forbes, who started in place of Anthony, had five points in 19 minutes.

Anthony, the No. 10 scorer in the NBA this season at 22.8 points per game, was scratched just before tipoff because of inflammation in his right knee. He is day to day.

“I’m somewhat surprised by it,” Karl said. “I kind of knew there was a chance he wouldn’t go about 15 minutes before the game.”

It was the third time in 11 home games the Celtics faced an opponent without its star. John Wall missed the Washington Wizards’ game in Boston, and the Thunder were without Durant, the NBA’s leading scorer, when they visited on Nov. 19.

The Celtics lost that one, so Rivers tried to withhold the information, thinking it might keep his players focused.

“Yeah, they knew I was lying,” he said. “The last time, it didn’t work. So we tried something different.”

The Celtics got all their sick and injured players back, with Rondo returning after missing Sunday’s game against New Jersey, Davis making it back from an illness and Shaquille O’Neal shaking off a sore calf. Nate Robinson missed practice Tuesday for personal reasons, leaving Boston with just eight players at the workout.

But the Celtics hit their first seven shots and opened a 16-4 lead before they missed one, on Garnett’s fall-away jumper with 8:04 left in the first. The lead was 30-11 before the Nuggets began to chip away.

They outscored Boston 29-12 over the bulk of the second quarter to pull within 51-50, with Lawson scoring 11 in the period. But the Celtics pulled away again, getting a long 2-pointer from Allen and a pair of free throws from Pierce, and when Allen hit a layup in the closing seconds it was 59-52.

The Nuggets never got within one possession after that.

Karl’s next victory would make him the seventh NBA coach to win 1,000 games. Only Phil Jackson, Pat Riley and Jerry Sloan did it in fewer games; only Riley and Lenny Wilkens hit the milestone at a younger age than the 59-year-old Karl.

NOTE: The Celtics nearly shot 70 percent in the first quarter, finishing 13 for 19 (68 percent).