BOSTON—Ray Allen couldn't miss early, and he was in the perfect place at the end.
Allen capped another great shooting night by grabbing a critical offensive rebound with 12 seconds remaining to help the Boston Celtics hold off Monta Ellis and the Golden State Warriors 107-103 on Friday night.
Allen made his first seven shots and finished with 27 points. He also pulled down three rebounds -- none bigger than the one he grabbed off Kevin Garnett's miss with the Celtics holding just a two-point lead.
"That was the best part of the day for me," said Allen, who wasn't sure he could play Friday because of a sore right knee. "I'm glad I'm able to do things like that for the team. Just knowing I can get in there. It's not just about me shooting the ball."
Paul Pierce also scored 27 for the Celtics, who let an 18-point lead slip to just one late in the fourth quarter and struggled to put away the pesky Warriors.
Ellis scored 28 of his 41 points in the second half as Golden State rallied and gave the short-handed Celtics a scare right to the end.
"We played a great game," Ellis said. "We made some mistakes, but we had a chance to win."
The Warriors' chances ended when Allen hit two foul shots after he snatched his only offensive rebound of the night. He also made his first seven shots and hit five straight 3-pointers.
Jeff Green added 21 points and Rajon Rondo had 16 assists for Boston.
David Lee had 26 points and 12 rebounds and Dorell Wright scored 11 for the Warriors, who took advantage of some shoddy defense by the new-look Celtics.
Boston was without forward Glen Davis, who has a strained tendon in his left knee, and then lost guard Von Wafer when he left in the second quarter with a strained right calf. Several of Boston's recent additions got significant playing time and the Celtics struggled defensively.
"It was a good test," Allen said. "We showed some resiliency. We should have never been in that predicament."
The Warriors picked apart the porous defense during a 14-4 run at the end of the third quarter to cut the deficit to 88-81, then Ellis opened the fourth with two free throws after drawing a foul while attempting a 3-pointer.
"I just thought our intensity level went up," Golden State coach Keith Smart said. "We became the aggressors."
The Celtics struggled to pull away and the lead dropped to 100-96 with 4:06 left on a 3-pointer by Ellis, who was alone in the corner for a pass from Stephen Curry. Ellis got open again and hit another 3 that made it 100-99 with 3:16 to go, but Pierce gave Boston some brief relief with a three-point play.
Golden State came right back with a fast-break dunk by Wright, then had a chance to tie it after the Celtics failed to score. But Curry tried a pass through the lane that went right to Garnett and led to a layup by Pierce to put Boston up 105-101.
Lee added a dunk to get the Warriors within 105-103 with 37 seconds left and they got a break when Garnett's long jumper bounced out, but Allen swooped in for the rebound and drew a foul with 12 seconds left. He hit both shots from the line.
NOTES: Allen didn't miss a shot until a 12-foot jumper bounced out with 1:19 left in the second quarter. ... The Warriors shot 52 percent in the first half, but that wasn't enough to keep up with Boston's 66 percent. The Celtics made 25 of 38 from the floor and seven of nine foul shots while taking a 64-53 lead into halftime. ... Green was playing in his fourth game with the Celtics since they got him in a trade with Oklahoma City at the deadline. His previous high for Boston was seven points against the Clippers in his Celtics debut. ... Warriors rookie Jeremy Lin, a Harvard graduate, was out of the lineup in his return to Boston.