LEEDS, Ala. (AP) — All it took was a change of mindset for Pato O'Ward to turn around his season.

Now he's on the verge of signing a new contract and a win Sunday at Barber Motorsports Park moved him back into the championship picture.

“It's all smiles and unicorns, man,” O'Ward said Sunday after his first victory of the season.

O'Ward entered the season vocally unhappy about his current contract with Arrow McLaren SP, which has the popular Mexican signed through 2024 to team-friendly terms. O'Ward wanted more money, more assurances for his Formula One aspirations and a new contract.

But when his unhappiness began to hurt his on-track performance, O'Ward made a conscious decision to compartmentalize his complaints and focus on his job. The effort led to Sunday's win, his first of the year and third of his career.

O'Ward used a strong outside pass of pole-sitter Rinus VeeKay after both pitted for fresh tires to take the lead then drive away for the victory. The win broke a Team Penske stranglehold on this year's IndyCar results.

“Man, it sucks to be at war within your own team, right? So I’m glad there’s been more positive talks for the future,” said O’Ward, who has agreed with McLaren on principle on an extension.

“I was tired of being 10th and 11th and fifth and I said ‘Let’s get a win under our belts so we can climb back into this championship race.’”

The victory rocketed O'Ward from ninth to fifth in the standings.

Penske drivers Scott McLaughlin and Josef Newgarden swept the first three races of the season, all while O'Ward was pouting over his contract. But on the eve of the Long Beach Grand Prix two weeks ago, the 22-year-old decided he didn't want to throw his season away over hurt feelings.

He dug deep for a fifth-place finish at Long Beach, huddled with McLaren head Zak Brown on the terms of an extension, then showed up in Barber ready to win some races. His shot came after a pit stop with 28 laps remaining when VeeKay and O'Ward pitted at the same time.

VeeKay came out ahead but O'Ward hunted him through the first four turns then used a brave move — and his push-to-pass — around the Dutchman to seize control of the race.

The win made Chevrolet 4 for 4 as IndyCar heads next to Indianapolis Motor Speedway.

“The driver in our team... is the quarterback, right? As the quarterback goes, the rest of the team goes. As the driver goes, the rest of the team goes,” said McLaren team president Taylor Kiel. "He has such an infectious spirit, such an energy, that it’s impactful to what we do in a very good way.

“I think we’ve got a driver that can compete and win at any circuit type. We put a good car together. If we come prepared, roll off the truck in a good window, it’s hard to beat.”

Alex Palou, the reigning IndyCar champion and defending race winner at Barber, finished second for Chip Ganassi Racing and reclaimed the points lead. His attention then turned to three weeks of racing in Indianapolis, where Palou was runner-up in last year's Indianapolis 500.

VeeKay, who led a race-high 57 of the 90 laps, faded to third for Ed Carpenter Racing.

“I was so much looking in my mirrors that I forgot to use my push-to-pass,” VeeKay said of not using a burst of extra horsepower to hold off O'Ward.

Will Power rallied from 19th to finish fourth, the best of the Penske drivers, while six-time IndyCar champion Scott Dixon was fifth for Ganassi.

There were late-race fireworks between fellow Honda drivers Graham Rahal and Romain Grosjean as the two raced for position, and an irate Rahal screamed over his radio “that guys a punk! He hit me on purpose."

An animated Rahal was seen after smacking his arm into Grosjean teammate Alexander Rossi to demonstrate Grosjean hitting Rahal's car.

“We touched a couple of times, but it was good racing,” said Grosjean, who denied hitting Rahal on purpose. “No. No. No. It's IndyCar, wheel-to-wheel action.”

Rahal didn't believe him.

“Look at that, look at how much room he has!” Rahal said watching the replay. “I'm just frustrated because this isn't the first time. In St. Pete, he hit everybody.”

Rahal then wondered if IndyCar officials are watching Grosjean — and even if they are, will they do anything about excessive aggression?

“As another driver in the series told me, ‘You can’t teach an old dog new tricks,' and he's had this reputation his whole career in Europe and we're learning his reputation quickly here,” Rahal said. “If race control doesn't want to do anything, then they aren't going to do anything. But when we go and punt him, they better not do anything to me. In the past, I've been penalized for a lot less than that.”

UP NEXT

IndyCar is off next weekend and most of the drivers are headed to Miami for Formula One's debut race on Sunday. The series returns to action May 14 on the road course at Indianapolis Motor Speedway. VeeKay is the defending race winner.

___

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