The Mavericks weren’t quite ready to call it a season Friday night.

Flashing fourth-quarter grit and desire that outdid whatever San Antonio could muster, the Mavericks closed out Game 6 with a remarkable, efficient run at both ends of the court for a 113-111 victory over the Spurs at American Airlines Center.

And so, the ultimate match — Game 7 — awaits these teams that clearly are so much closer in talent and heart than their Western Conference seedings would suggest.

The Mavericks on Sunday will try to become just the sixth No. 8 seed to take down the top-seeded team in the first round.

The Spurs will be trying to avoid losing in the first round as the No. 1 seed for the second time in four years.

Start time for Game 7 — either noon or 2:30 p.m. — wasn’t known until Portland’s late game against Houston finished Friday night.

“It’s another one-game season for us,” Mavericks coach Rick Carlisle said. “We’ve had ’em all year. We know what this is about, and we wanted this opportunity. This is what you live for if you’re in this sport.

“Game 7s are great. I’ve been a part of a bunch of ’em. We’re going to go in there and play our butts off. It’s a great opportunity for us. Our guys knew what was at stake.”

The Mavericks are 4-1 all-time in Game 7s. Dirk Nowitzki has never lost a Game 7, going 4-0.

“It’s the ultimate thrill,” said Nowitzki, who plopped in 22 points. “It’s win or go home. Everything that happened before is out the window. Nothing matters anymore but just this one game. It’s great competition, the ultimate competition. You just got to love it. We’re going into a tough environment against a great team.”

It almost didn’t happen.

After a poor third quarter, the Mavericks were down by seven points early in the fourth quarter. They rallied with their defense and some hard-core drives to the basket by Monta Ellis (whose 29 points tied his career playoff high) and Vince Carter.

When DeJuan Blair — having a monster game — converted a three-point play with 4:28 left, the Mavericks were up 97-92. The advantage reached 102-94 on an Ellis drive, but Tony Parker took over for the Spurs, and his third consecutive layup chopped the lead to 106-105 with 49.4 seconds left.

Carter went to the hole strong and got fouled, hitting both free throws.

Then Blair stripped Parker as he tried to get to the basket. He hit one of two free throws to make it 109-105 with 28.7 showing. When Kawhi Leonard had a short jumper rim out and Blair ripped down his 14th rebound and was fouled with 23.7 to go, the Mavericks looked safe.

Not so. They missed enough free throws and San Antonio made enough 3-pointers to make it dramatic. It was 113-111 with seven seconds left and Ellis threw away a pass after dribbling out most of the clock.

That gave the Spurs a chance with 1.3 seconds left, but they couldn’t get a shot off after getting the ball into the frontcourt on a long pass that was tipped out of bounds by Ellis.

The Mavericks got great production out of Blair, who had 10 points to go with his superior rebounding. And when Ellis began attacking the basket in the fourth quarter, the Mavericks fed off of his energy.