Even a 20-point deficit doesn't derail the Miami Heat these days.

LeBron James had 25 points and 10 assists, Dwyane Wade also scored 25 points and the Heat overcame a 20-point deficit to beat the Golden State Warriors 114-107 on Saturday night for their 17th victory in 18 games.

Chris Bosh added 20 points and 11 rebounds to help Miami pull into a virtual tie with Boston atop the Eastern Conference. The Celtics lead Miami by .031 percentage points, but the teams are tied in the games-back column.

"We weren't playing Miami Heat basketball," Wade said about the first half. "I didn't really notice that team out there. But we got it together."

Former Heat forward Dorell Wright scored 30 points for Golden State in his first trip back to Miami as an opponent. Monta Ellis added 25 and Stephen Curry had 15 for the Warriors.

Golden State had 36 points in each of the first two quarters, then 35 in the entire second half. Miami held the Warriors to 13-of-43 shooting after halftime.

James, Wade and Bosh combined for 35 points in the second half — matching Golden State's total.

"Everybody was pretty calm," Bosh said of the mood at the half. "There was no reason to get erratic or kind of lose our cool. We knew we played a subpar first half, especially on the defensive end, and we had to pick it up and change that."

David Lee finished with 13 points and 12 rebounds for Golden State, which hit eight of its first nine tries from 3-point range. The largest lead the Warriors had blown in an eventual loss this season was nine, at Detroit on Nov. 7.

And Wright made this one plenty interesting. He connected on his sixth 3-pointer with 5:18 left, then hit a high-arcing layup over Joel Anthony to draw the Warriors to 100-96 a minute later.

It was the last gasp.

Bosh kept a play alive with his team-best third offensive rebound of the night, Mario Chalmers made a 3-pointer from the right wing, James then hit a pair of free throws with 3:14 left, and the Heat cushion was quickly back to 105-96.

"We just didn't have what we usually have on the defensive end," James said. "That's how we got down. Give them a lot of credit, but also, we knew we didn't play really good basketball on both ends at the start of the game."

James Jones scored 13 points and Carlos Arroyo added 11 for Miami, which outrebounded the Warriors 18-9 in the fourth.

In six years with the Heat before accepting an $11 million, three-year offer from Golden State this summer, Wright reached 14 points only 11 times in home games.

So of course, in his return, he had that many in the opening quarter.

"I'm just getting an opportunity," Wright said. "I don't have to worry about anything. Just go out there and play my game. There is no better feeling than that."

Said Wade, one of his closest friends: "He's been playing great. ... He had a great game and I'm happy to see him be aggressive that way."

Wright may have been the catalyst of a surprising start by the Warriors, though hardly the only contributor. Ellis and Lee combined for 27 points by halftime as well, further frustrating Miami.

Almost proving everything was going the Warriors' way, Ellis banked one in from half-court at the first-quarter horn, and Golden State — buoyed by a 6-for-7 effort from 3-point range — held a 36-28 lead, the most points Miami yielded in a first quarter this season.

It was exactly what Heat coach Erik Spoelstra feared would happen against a high-octane offense. Miami allowed 58 points in the second half against the Knicks on Tuesday, then gave up 119 points the following night in Houston.

Though Miami won both games, Spoelstra ran the Heat through what he called a "training-camp-style" practice on Friday, focusing mostly on defense. The Heat may have been bracing for another of those workouts, since Golden State's offensive onslaught didn't stop in the second quarter, either.

Golden State romped to another 36-point period, held 20-point leads on four separate occasions — matching the biggest deficit Miami faced all season — and gave up the final six points of the half to take a 72-58 lead into intermission.

"What we did in the first half was simply not good enough," Spoelstra said. "It's not. You're building bad habits by playing at that level."

It all changed in the third quarter.

Miami forced Golden State into missing its first nine shots, started the half on a game-changing 15-3 run and wound up holding the Warriors to just 12 points in the period on 5 for 20 shooting. And when Bosh made two free throws for an 85-84 edge with 11:27 left to play, the Heat wouldn't trail again.

"They got within their strengths, came out more aggressive, got to the basket, forced the issue a little bit more," Warriors coach Keith Smart said. "That's what they do."

NOTES: Wright's high in 101 games at Miami was 26 points, and he averaged a mere 6.1 on the Heat home floor after being drafted out of high school. ... Miami moved to 6-0 against the Pacific Division. ... Heat forward Juwan Howard grabbed the 5,000th defensive rebound of his career in the third quarter.