Jason Kidd made a 3-pointer with 2.5 seconds left, putting the Dallas Mavericks ahead as they beat the Boston Celtics 101-97 on Friday night for their seventh straight win.

The Celtics led 97-91, but the Mavericks scored the final 10 points. After Kevin Garnett missed an 18-foot jumper with 15 seconds to go, the Mavericks tried to go inside, but Dirk Nowitzki had trouble handling the ball and threw it to Kidd, who made his second 3-pointer of the game.

After a timeout, Boston's Rajon Rondo threw the ball over Garnett's head and out of bounds on an alley-oop play. Garnett then fouled Nowitzki, who made two free throws with 2.2 seconds left. Ray Allen then missed a 3-pointer at the buzzer for Boston.

Nowitzki led Dallas with 29 points while Allen topped Boston with 24.

Allen went 3 for 6 on his 3-pointers and needs to make six more to break Reggie Miller's NBA record of 2,560. His next chance to add to his total of 2,555 comes Sunday at home against the Orlando Magic.

The Celtics fell to 22-4 at home, the third-best record in the NBA. And they seemed headed to another victory in front of their fans with less than three minutes to go in a game that was tight throughout.

A layup by Kendrick Perkins with 2:42 remaining put the Celtics ahead 97-91. But they didn't score again.

Nowitzki began the game-winning spurt with a three-point play with 2:22 to go and Jason Terry made it 97-96 with two free throws with 56 seconds left.

Allen missed a 3-pointer. Then Garnett stole the ball from Nowitzki, but Boston couldn't take advantage as Garnett missed his 18-footer.

The Mavericks immediately called timeout and nearly ruined their opportunity when Nowitzki fumbled the ball inside. But Kidd bailed him out and the Mavericks had their second close win over the Celtics this season.

Dallas won the first meeting 89-87 at home on Nowitzki's jumper with 17.9 seconds remaining, ending Boston's five-game winning streak.

On Friday, Terry had 17 points and Tyson Chandler had 14 points with 15 rebounds for Dallas. Boston got 16 points from Garnett, 12 of them in the first quarter, and 13 points and 12 rebounds from Perkins, making his first start in his six games this season following offseason surgery for a knee injury sustained in Game 6 of the NBA finals against the Los Angeles Lakers.

Dallas and Boston were tied at 77 entering the fourth quarter and the game remained tied at 81 before Nowitzki's turnaround shot from the left baseline put Dallas ahead 83-81 with 9:44 to go. But the Celtics scored the next seven points, making it 88-83.