MIAMI -- Before the NBA Finals, San Antonio Spurs forward Tim Duncan said, "We're going to do it this time."

Maybe Duncan was right.

The hot-shooting Spurs moved to within one win of their fifth NBA title since 1999, defeating the Miami Heat 107-86 Thursday night at AmericanAirlines Arena.

The Spurs shot 57.1 percent from the floor overall en route to a 3-1 lead in the best-of-seven NBA Finals. None of the 31 previous teams to fall behind by that deficit in the league championship series rallied to take the title.

Game 5 is Sunday night in San Antonio.

San Antonio outscored the Heat in each of the first three quarters and headed into the fourth with an 81-57 lead.

Spurs forward Kawhi Leonard had 20 points and a game-high 13 points, and point guard Tony Parker added 19 points. Duncan (10 points and 11 rebounds) and forward Boris Diaw (eight points, nine rebounds and a game-high nine assists) also played well.

The Spurs are 2-0 since Diaw was inserted into the lineup over center Tiago Splitter.

"Boris makes us a smarter team," Spurs coach Gregg Popovich said of Diaw, who was cut by the Charlotte Bobcats in March 2012. "Boris is a passer, and he understands mismatches. On defense, he knows where to help."

San Antonio, which lost to Miami in a dramatic seven-game championship series last year, held the Heat to 45.1 percent shooting Thursday.

"It's great that we get the opportunity to go back home," Diaw said, "but we know it will not be an easy game. We know they will play for their lives."

Forward LeBron James led the Heat with 28 points, but center Chris Bosh (12 points) and guard Dwyane Wade (10 points) were held in check. Through three quarters, Wade was just 1-for-10 from the floor.

James left the floor twice under somewhat unusual circumstances -- first for a bathroom break and then to get his ankle taped. He had 19 points in a huge third quarter but was otherwise quiet.

"We have put ourselves in a position where we have to make history," James said of the 3-1 deficit. "They smashed us in two straight home games. They were much better than us in these two games, but the series is not over.

"I know (coming back from 3-1) has never been done before. We're still a confident bunch, even though our heads are down a bit right now."

Miami had won 13 consecutive games following a playoff loss, but that streak is over. Before Thursday, the Heat played 48 straight playoff games without losing consecutively, the third-longest streak in NBA history, surpassed only by the 1962-1966 Boston Celtics (54) and the 1990-93 Chicago Bulls (52).

The Heat, the two-time defending league champions, now have no margin for error.

Meanwhile, San Antonio has won three straight road games, including the victory over the Oklahoma City Thunder that clinched the Western Conference title.

Overall, the Spurs have 11 wins by more than 15 points in this postseason.

"They played great," Heat coach Erik Spoelstra said of the Spurs. "I don't think any of us were expecting this type of performance. You have to give them credit, but this was the biggest surprise of the series."