Luka Dončić drilled a 3-pointer from the top of the key with 3 seconds remaining and finished with a triple-double as the Dallas Mavericks rallied for a 109-108 win over the Minnesota Timberwolves and a 2-0 lead in the Western Conference finals on Friday night.

Doncic had 32 points, 13 assists and 10 rebounds for his eighth triple-double in 42 career playoff games for the Mavericks, who erased a 16-point deficit midway through the third quarter.

After winning two on the road, the Mavericks look to take a commanding 3-0 lead as the series shifts to Dallas on Sunday night.

Naz Reid scored 23 points with seven 3-pointers, but his last shot at the buzzer rimmed out as the Timberwolves endured another off night from stars Anthony Edwards and Karl-Anthony Towns. Edwards had 21 points on 5-of-17 shooting and Towns scored 15 on 4 of 16 from the field.

Jaden McDaniels, who had 20-plus points in each of Minnesota’s last three games, didn’t make a basket until midway through the third. He finished with two points on 1-of-6 shooting.

Kyrie Irving scored 13 of his 20 points in the fourth quarter, including a 3 from the corner with 65 seconds left that drew Dallas within 108-106.

Minnesota committed two turnovers, the last one by Edwards, who recklessly threw the ball out of bounds off a drive with 13 seconds to go.

Doncic took the inbounds pass and dribbled to set up a screen for Dereck Lively II that triggered a switch by the Wolves. Rudy Gobert covered Doncic, but the Mavs superstar sank the 3 and then flexed his arms and yelled at the stunned crowd as his teammates mobbed him.

The Wolves pushed their lead to 68-52 on Mike Conley’s free throw with 9:07 left in the third quarter, but Dallas scored eight straight points and was within 79-77 on Irving’s basket with 1:22 to play in the quarter.