(AP) -- LeBron James tied his playoff career high with 49 points, Chris Bosh made the tiebreaking 3-pointer with 57 seconds left, and the Miami Heat beat the Brooklyn Nets 102-96 on Monday night for a 3-1 lead in the Eastern Conference semifinals.
James carried the Heat nearly the entire way until Bosh hit the shot that put Miami ahead for good. Ray Allen followed with four free throws and James finished it off with one more, putting the Heat in position to wrap it up at home Wednesday in Game 5.
James was 16 of 24 from the field and 14 of 19 from the free throw line in matching the 49 points he scored for Cleveland against Orlando in the 2009 Eastern Conference finals. He missed his second free throw with 1.1 seconds left, muttering to himself after it fell out.
Joe Johnson scored 18 points for the Nets, who were 15 of 25 from 3-point range in their Game 3 victory but only 5 of 22 in this one. Paul Pierce scored 16 points, while Deron Williams and Shaun Livingston each had 13.
Dwyane Wade scored 15 points on the night his Heat postseason record of 46 points was shattered. Bosh finished with 12.
Miami pulled out a thrilling victory in a game neither team led by double digits and has won at least one road game in 14 straight series, breaking the record set by the Chicago Bulls from 1991-94.
Brooklyn opened the fourth quarter with six straight points to grab an 82-79 edge, and neither team had a bigger margin than that in the period until Kevin Garnett's two free throws tied it with 2:30 remaining.
Both teams then couldn't score, with Bosh missing a pair of jumpers before getting a third crack at it when the Heat swung the ball around to him in the corner in front of the Brooklyn bench for a 3 that made it 97-94. Johnson then missed a jumper while trying to draw James' sixth foul, and Allen's free throws put it away.
Wade scored 46 points against Boston in the first round of the 2010 playoffs, and James' best in a Heat uniform had also come against the Celtics, his memorable 45-point performance that saved Miami's season in Game 6 of the 2012 Eastern Conference finals.
Pierce, who asked to guard James after Game 1, was on the wrong end of an assault that was ever better this time.
James and the Heat had shrugged off a couple days of chatter from Pierce, who said the Nets weren't afraid of the Heat. But things were testy at the start, with first-quarter technical fouls for James, Pierce, Shane Battier and Alan Anderson. Miami started quickly again, making nine of its first 12 shots, and led 27-22 after one behind 12 points from James.
He opened the second on the bench and Brooklyn started with a 9-2 spurt to take its first lead at 31-29 when Andrei Kirilenko converted a three-point play. James was a force once he returned -- especially after a second foul against him seemed to get James more annoyed than any of Pierce's talking did.
James made three straight baskets to turn a three-point deficit into a three-point lead, and he gave Pierce a glare after a thunderous slam later in the period. He had 13 points in just 7 ½ minutes of the quarter, and the Heat led 56-49 after making 24 of 38 shots (63 percent) in the first half.
He had 13 straight Miami points in the third, but the Nets were able to get back in the game while the rest of the Heat were being shut out. Brooklyn cut it to one on a few occasions before James made a pair of free throws after coming up with a steal, and Miami led 79-76 going to the fourth.
Notes: Mirza Teletovic was held to four points and missed all three 3-point attempts. He had been 11 of 19 in the series, Wade saying before the game it was "red alert" when he entered. ... As they have during postseason home games, the Nets had a Brooklyn-based entertainer announce their starting lineups. On Monday it was Mike D of the Beastie Boys. Denzel Washington, Spike Lee and Floyd Mayweather Jr. were also in the crowd.