MARTINSVILLE, Va. (AP)Brandon Jones overtook Ty Gibbs on the last lap of a two-lap sprint to the finish and won at Martinsville Speedway on Friday night for his fifth career victory, and one that set off a brawl on pit road when it was over.

On the final restart, which followed a number of cautions, Gibbs opted to start on the inside lane, and had to outrun Jones, his Joe Gibbs Racing teammate, also on the inside while running second. Jones got inside him several times, then finally grabbed the top spot while Gibbs got caught up in a mess.

”What a day,” Jones said after climbing from his car. ”I can’t say that we could have played it out any better. … I had older tires than all those guys at the end.”

When it was over, Gibbs and longtime rival Sam Mayer, both of whom were racing for a $100,000 Dash4Cash bonus, came to blows on pit road. Gibbs was wearing his helmet, while Mayer was not, and when Mayer pushed him, Gibbs threw a punch and they came together in a melee as others tried to break it up.

”I tried to talk to him and he got all in my face and at that point, we’ve got to start fighting,” Gibbs said. ”We got put in a bad position there. The only thing I’m mad about is (Mayer) didn’t have anything. He wasn’t going to get past (third-place finisher A.J. Allmendinger) and I just got hit in the left rear.”

But, Gibbs acknowledged, a week ago at Richmond Raceway, it was he who had to apologize to teammate John Hunter Nemechek for nudging him on the final lap to claim the victory, his series-best third through seven races.

Instead of a fourth win Friday night, he finished eighth.

Mayer admitted that once he was pushed up the track and out of contention for the win, he focused on winning the $100,000 Dash4Cash bonus.

”I had the $100,000 in my sights and I was going to do what I had to do to try to get that. Yeah, I put the bumper to him,” he said, describing the move as a ”clean bump and run.” He said Gibbs, who was also eligible for the bonus, ”just snapped,” but that they talked afterward and ”we’ll be good going forward.’

Before the wild finish, Gibbs had emerged unscathed each time the last several of 16 yellow flags flew as cars spun behind him. Much of the field then crashed on the first attempt at a two-lap overtime sprint to the finish when Mayer, running second, caused Noah Gragson, running third, to spin, causing a major pileup even before the field made it into the first turn.

That was the final caution of the chilly night and brought out a red flag that lasted just under 20 minutes, setting the stage for the drama at the finish.

Landon Cassill came from nowhere to finish second, the first of four Chevrolets behind Jones’ Toyota as Allmendinger was third – and claimed the $100,000 bonus – followed by Austin Hill and Mayer.

Dale Earnhardt Jr., who made his first career start on the 0.526-mile oval in his annual foray into the series, started at the back, never contended and was 11th.

It also was a difficult finish for points leader Gragson, who ran up front for much of the night but was relegated to 20th place after Mayer took him out.

More AP auto racing: https://apnews.com/hub/auto-racing and https://twitter.com/AP-Sports