Dirk Nowitzki of the Dallas Mavericks dunks against Miami’s Mike Miller. (Tom Pennington/GETTY IMAGES)

LeBron James was towering over him, daring Jason Terry to do something with the basketball as the shot clock was winding down. With nowhere to go, and with Dirk Nowitzki blanketed by Udonis Haslem, Terry couldn’t worry about being well beyond the three-point line. So, he took a dribble, stepped back and pulled up over James’s outstretched hands.

After seeing the ball rattle around the rim and drop through the net, Terry — whose nickname is “Jet” — leaned over and stretched out his arms like an airplane as he helped salvage a 112-103 victory that put the Dallas Mavericks within one win of their first NBA championship in the franchise’s 31-year history. Terry’s unconscious jumper gave the Mavericks a three-games-to-two lead over the Miami Heat in the NBA Finals, with the next two games in Miami.

“I really wanted the ball in that situation,” Terry, a native of Seattle, said after scoring 21 points and handing out six assists. “It’s just like being out there on the playground back home in Seattle. Emulating your idols in the Finals situation, game on the line. Raise up, knock it down.”

Nowitzki added 29 as the Mavericks became the first team to win consecutive games in this tightly contested series. The Heat returns to home needing to win both games with Dwyane Wade nursing a bruised left hip and James suffering with bruised ego.

After his curious disappearance two nights before, James proclaimed Game 5 the biggest game of his career, placing perhaps too much pressure on himself with a late-night comment on his Twitter account that read, “Now or Never!!”

He finished with a triple-double (17 points, 10 rebounds and 10 assists), but was limited to just two points in the fourth quarter — a meaningless driving layup after Terry’s three-pointer put the Mavericks ahead by seven points.

He did, however, orchestrate an impressive fourth-quarter run, using his passing and playmaking skills to set up his teammates and bring the Heat back from a seven-point fourth-quarter deficit. But when he decided to be more aggressive offensively, it backfired. He was called for an offensive foul trying to drive the baseline, then missed a three-pointer late. James missed all four of his three-point attempts and was 8 of 19 from the field.

“We as a team played well enough to win,” James said. “I could have made a couple more plays for my team. But at the end of the day, all it’s about is a win or loss. Triple-double means nothing in a loss.”

The Heat nearly lost more than a game, when Wade suffered a left hip contusion in the first period. He drove inside and crashed into Mavericks reserve Brian Cardinal while driving to the basket and went sliding to the baseline, grimacing in pain. He went to the locker room about a minute later, followed by the team trainers and returned but Mike Miller started in his stead at the beginning of the third quarter.

Wade still led the team with 23 points, but he didn’t score in the final 4:37, when the Mavericks closed out on a 17-4 run. “Once you’re on the court, you’re on the court,” Wade said. “I don’t have no excuses. I was on the court. I was able to help my team get an opportunity to win. I’ll be good for Game 6.”

Chris Bosh had 19 points and 10 rebounds and backup point guard Mario Chalmers had 15 points for the Heat. “By definition, this certainly is a series of mental and physical endurance,” Heat Coach Erik Spoelstra said. “We worked extremely hard to get home court. Nothing that we’ve achieved this year has been easy. So, we’re certainly not going to start now. Now when we go back to Miami, we wouldn’t want to have it any other way.”

The series had been a defensive struggle, with neither team scoring more than 95 points in any of the first four games. The previous two games in Dallas were both in the 80s. But the Mavericks and Heat appeared to figure out how to break through, topping stifling defense with better offense. The Mavericks shot 56.5 percent, while the Heat shot 52.9 percent.

Dallas had five players score in double figures, with J.J. Barea scoring 17 points and Jason Kidd and Tyson Chandler both scoring 13. The Mavericks were also 13 of 19 (68.4 percent) from three-point range. “We made more shots,” Mavericks Coach Rick Carlisle said. “You never know when the game is going to go that way. You get got, you get on a roll, and you can have a night like that. They don’t happen very often.”

Nowtizki gave the Mavericks a 90-83 lead with two free throws before the Heat went on a furious rally. Miami scored five unanswered before Barea hit a three-pointer. Nowitzki made two more free throws, and the Heat scored nine consecutive points, taking a 99-95 lead when Wade made a three-pointer.

Terry later tied the game at 100 with a three-pointer and Nowitzki gave the Mavericks the lead for good when he went back door and made a two-handed dunk. Terry then drove inside and kicked the ball back to Kidd for a three-pointer and put the game out of reach with a long-range shot of his own.

“It’s not a best-of-five series; it’s a best of seven,” Nowitzki said. “So the first team to four wins. We couldn’t celebrate, even though it was a big win for us. The series is not over.”