Russell Westbrook hit a go-ahead 3-pointer with 4.3 seconds remaining as the host Washington Wizards posted an unlikely 149-146 victory over the Brooklyn Nets on Sunday night.

Washington’s only lead was briefly in the second quarter before the frenetic final seconds that saw them overcome a five-point deficit in the final 12.3 seconds. Bradley Beal’s 3-pointer from the top of the key with 8.1 seconds left got Washington within 146-144.

Washington had a chance to tie or get the lead when Garrison Matthews intercepted an inbounds pass by Joe Harris intended for Kevin Durant with 6.8 seconds left. He quickly dished to Westbrook, who sank a 3-pointer over Kyrie Irving with 4.3 seconds.

After Brooklyn used two timeouts, the Nets could not score when Timothe Luwawu-Cabarrot’s point-blank layup rolled around the rim and out with seventh-tenths of a second remaining. After officials ruled there was still time remaining, Beal hit two free throws for the final margin.

Westbrook scored 15 of his season-high 41 points in the fourth quarter as Washington snapped a four-game losing streak and he also added 10 rebounds and eight assists. Beal added 22 of his 37 in the final stanza as Washington beat the Nets in the final seconds for the second time this season after overcoming a nine-point deficit in the final 4:54.

Durant scored 37 and Harris added a career-high 30 for the Nets, who saw a four-game winning streak stopped and played without James Harden (left thigh contusion). Irving added 26 and Jeff Green contributed a season-best 23 for Brooklyn, which shot 56.8 percent and led by 18 late in the first quarter.

Durant’s free throws extended the lead to 141-136 with 1:18 remaining but Rui Hachimura’s 3-pointer made it 141-139 with 70 seconds left. After Harris missed a layup, Westbrook forged a 141-141 tie on a reverse layup with 41.1 seconds left but 10 seconds later, Irving hit a 17-footer for a 143-141 edge.

Following a Washington timeout, Beal missed an open 14-footer with 26.2 seconds left and Green split two free throws with 23.3 seconds left. The Wizards missed a chance to tie when Westbrook’s 3-pointer was short with 16.1 seconds to go and the ball deflected out of bounds off Bertans. Irving hit two free throws for a 146-141 lead.

Brooklyn held a 108-101 edge into the fourth after Moritz Wagner hit a 3-pointer at the buzzer. The Nets took a 130-121 lead on Irving’s 3-pointer with 4:54 left but Washington was within 132-131 on Westbrook’s 3-point play with 2:41 left.