NEW ORLEANS (AP) — Anthony Davis set career highs with 40 points and 21 rebounds, and Eric Gordon made two crucial free throws in overtime to lead the New Orleans Pelicans to a 121-120 victory over the Boston Celtics on Sunday night.

Tyreke Evans added 26 points and Gordon had 19 for the Pelicans, who had lost two consecutive games. Gordon’s foul shots with 9.4 seconds remaining gave the Pelicans a 121-117 lead.

Davis did not score in overtime but controlled the middle by grabbing six rebounds. He became the first player in franchise history to have at least 40 points and 20 rebounds in the same game.

His previous high for points was Friday night when he scored 36 in a loss against Portland. Davis’ 21 rebounds erased his previous career high of 19 against Orlando on Jan. 26.

Jeff Green scored 39 points, including three big free throws with 4.7 seconds remaining in regulation, but Boston lost its fourth consecutive game.

Kris Humphries scored 16 points for the Celtics, including a long jumper to send the game into overtime. Jared Sullinger added 14 points and Avery Bradley had 12.

Davis’ jumper with 1.7 seconds remaining in regulation lifted the Pelicans to a 112-110 lead. But Humphries responded with a fadeaway from deep in the right corner.

Green answered Gordon’s free throws in overtime with a three-point play that trimmed New Orleans’ lead to 121-120 with 5.7 seconds. But the Celtics were unable to foul on the inbounds play and New Orleans ran out the clock.

Evans’ layup with 5:33 remaining in the fourth quarter gave the Pelicans a 102-89 lead. Boston then closed with a 23-10 surge to force the extra period.

The Celtics, who attempted to push the pace against the defensive-minded Pelicans, closed the first half on a 17-8 run to take a 64-57 halftime lead.

Green had 20 points at the break. He had a tying dunk with 4:11 left and a 3-pointer with 2:35 remaining, giving Boston a 54-49 lead.

Bradley, who opened the second quarter by scoring four consecutive points, had eight points at the break.

Davis’ 14 first-half points led to the Pelicans outscoring Boston 38-26 in the paint.

HEAT 113, ROCKETS 104: Ray Allen scored 14 of his 25 points in the fourth quarter on a milestone day for the veteran, LeBron James and Dwyane Wade each scored 24 and the Miami Heat beat the Houston Rockets to snap their worst skid in three years.

Chris Bosh added 18 points for the Heat, who won for just the second time in their last seven games. They were down 97-92 following a 3-pointer by James Harden midway through the fourth, then finished the game on a 21-7 run.

Allen had 11 points during that late stretch, including a 3-pointer that allowed him to pass Allen Iverson for 21st on the NBA’s scoring list. It was also the 750th regular-season win that Allen was a part of in his career.

Harden finished with 30 points for Houston, which got 21 points and 14 rebounds from Dwight Howard. Patrick Beverley added 15 points and Terrence Jones scored 12 for the Rockets, who’ve dropped three straight.

SUNS 121, RAPTORS 113: Markieff Morris had 16 points and 14 rebounds, Gerald Green scored 13 of his 28 points in the fourth quarter, and Phoenix beat Toronto for its second straight victory.

Goran Dragic scored 19 points, Eric Bledsoe had 14 and P.J. Tucker 11 for the Suns, who had lost three of four before winning 87-80 at Boston on Friday.

Bench scoring was a big edge for Phoenix, whose reserves outscored Toronto’s 59-11.

Kyle Lowry had 28 points and 13 assists, and Terrence Ross scored 22 points as Toronto lost at home for the first time since a triple-overtime defeat to Washington on Feb. 27, snapping a four-game winning streak at Air Canada Centre.

BOBCATS 101, BUCKS 92: Kemba Walker scored 21 points and Al Jefferson added 16 of his 20 in the second half to help Charlotte beat Milwaukee for its fourth straight victory.

Gary Neal added 18 in his return to Milwaukee after the Bucks traded him to Charlotte last month. Gerald Henderson scored 14 as the Bobcats matched their longest winning streak of the season, set Feb. 18-22.

Brandon Knight scored 21 points and Ramon Sessions added 18. Jeff Adrien and John Henson each had 12, but it wasn’t enough to stop the Bobcats from their first sweep of a season series from the Bucks.