Rep. Martha McSally (R-Ariz.) surged into first place with a commanding 14-point lead in Arizona's closely watched GOP Senate primary, according to a new poll.

A poll conducted by Phoenix-based OH Predictive Insights (OHPI) has McSally ahead with a little over 39 percent of the vote, followed by former state Sen. Kelli Ward at 24.5 percent and former Maricopa County Sheriff Joe Arpaio trailing far behind at nearly 14 percent. About 22 percent of voters remain undecided.

This is a big shift, since OHPI's last poll, from April, had Ward in first place and leading McSally by 9 points in the race to replace retiring GOP Sen. Jeff Flake. Arizona will hold its primary on Aug. 28.

Mike Noble, OHPI's chief pollster, said McSally's rise can be attributed to her improved name recognition and willingness to cast herself as President Trump's ally.

"McSally is starting to tell her story, she's flush with cash, and she benefited from her pivot to embrace Trump. That all puts her in the driver's seat - or should I say the cockpit?" Noble said.

"With only 22.4 percent of voters undecided in the GOP primary and early voting approximately 40 days away, expect the attacks to start flying as the candidates ratchet up the pressure."

Tuesday's poll found McSally, who's represented her Tucson-area swing seat since 2015, is leading her GOP challengers in both Maricopa and Pima counties, as well in more rural parts of the state.

McSally is also ahead of her opponents among the different ideological bases of likely GOP primary voters. The congresswoman leads Ward by more than 10 points among voters who consider themselves Trump Republicans. McSally also dominates Ward among support from moderate voters, 43 percent to 16 percent.

The eventual GOP nominee is expected to face Rep. Kyrsten Sinema (D) in November. Arizona is one of Democrats' few pick-up opportunities in the Senate this cycle

While Democrats haven't won a Senate seat in Arizona since 1988, the party is feeling more emboldened about the race, especially since Sinema doesn't face a tough primary. OHPI didn't poll the general election in Wednesday's survey, but in its April poll, Sinema was leading all three Republican challengers in head-to-head match-ups.

The poll was conducted from June 11 to 12 and surveyed 600 likely GOP primary voters via landline. Ninety percent of respondents were Republican, while the other 10 percent independents. The margin of error was 4 percentage points.