The Lakers lost a lead and almost the game. Happens all the time in the NBA.

But losing a 27-point lead? And successfully scurrying to win after the fact in the final minutes? That's hard to do.

The Lakers beat the Brooklyn Nets, 99-94, after holding a 48-21 edge in the second quarter Wednesday at Barclays Center.

Mirza Teletovic led a fourth-quarter rally with three three-pointers as the Nets caught the Lakers at 92-92 on Teletovic's free throw with 3:57 to play.

But the Nets (4-11) never did take the lead. The Lakers (8-8) held on to improve to 2-5 on the road and won on the second night of a back-to-back for the first time in four tries this season.

Wesley Johnson stole Paul Pierce's cross-court pass and dunked at the other end for a 94-92 Lakers edge with 1:33 to play.

Jodie Meeks made two free throws with 8.3 seconds left for a three-point cushion and Paul Pierce missed a last-second three-point shot. Xavier Henry got the rebound and made two free throws with 0.4 seconds left.

Nick Young had 26 points and Pau Gasol had 21 points and eight rebounds for the Lakers.

Joe Johnson had 18 points and Teletovic had 17 for the Nets.