AVONDALE, Ariz. — It was Ali-Frazier at the Garden. It was Celtics-Lakers with Bird and Magic.

It was NASCAR’s dream.

Punch and counterpunch. The top two drivers in the Chase for the Sprint Cup trading shots in Sunday’s Kobalt Tools 500 at Phoenix International Raceway.

Yes, Kasey Kahne won the race — his first victory of the season and the 12th of his career — but Carl Edwards and Tony Stewart dominated the action as their battle for the championship remained as close as it was at the start of the day.

In a race between the only two drivers mathematically alive for the Cup championship, Edwards finished second and Stewart third, but Stewart led the most laps for the second straight week and leaves Phoenix three points behind Edwards as the drivers prepare to settle the issue in the season finale next Sunday at Homestead-Miami Speedway.

“We couldn’t ask for anything more,” Edwards said. “It’s going to be fun. It’s neat to be able to go to Homestead and race it out. I’m sure these guys [Stewart’s team] are going to be good down there — they’re fast on the mile-and-a-half [tracks].

“I’m just proud of my guys today. They did a great job on pit road. Tony was really fast, and we got our car tuned in, and we were able to go up there and race with them and compete. It was just a good, hard-fought day, and I’m really pumped about Homestead.”

Stewart appeared poised to win his fifth race in the Chase before the handling on his No. 14 Chevrolet deteriorated slightly in the final 100 laps.

“We just came up two spots shy,” Stewart said. “It was just a little too loose on entry those last two runs there. I thought that Darian [crew chief Darian Grubb] made a really good call there with just gas only at the end [on Stewart’s final pit stop on Lap 294], and we were able to run Jeff [Burton] down there and get back to third.

“Every point counts right now, and that’s why we raced Carl so hard and Kasey so hard to make sure we led enough laps to lead the most laps today [160]. We are going for every single point we can get.”

Stewart said the formula for winning the title is simple.

“Just keep doing what we’re doing,” he said. “We’re going to keep the pressure on him, and we’re going to make him sweat it out.”

Seven more drivers, all of whom started the Chase nine weeks ago with hopes of hoisting the Sprint Cup, were eliminated from championship contention. Kevin Harvick, Matt Kenseth, Brad Keselowski, Jimmie Johnson, Dale Earnhardt Jr., Jeff Gordon and Kurt Busch joined Kyle Busch, Denny Hamlin and Ryan Newman in a group that will be fighting for positions in the standings but not for a title.