A US federal prosecutor in California said Friday he was investigating alleged fraud in this week’s gubernatorial primary election, after President Donald Trump claimed — without proof — that there was cheating.

Trump — who cited fraud when he sought to overturn his 2020 presidential election loss — has repeatedly cast doubt on the integrity of ballots in the liberal state.

On Thursday, the US president complained about the fact that there was still no definitive result two days after polls closed Tuesday.

First Assistant US Attorney Bill Essayli — who was appointed by Trump — said Friday he would examine the way the vote was conducted.

“California’s election system has serious structural vulnerabilities,” Essayli wrote on social media.

“Universal vote-by-mail with no voter ID requirements creates conditions where fraud can go undetected and unpunished, eroding public confidence.

“My office has multiple election fraud investigations underway in coordination with (the FBI). We will follow the evidence wherever it leads and prosecute any violations of federal election law to the fullest extent.”

With around two-thirds of votes counted, Trump-backed Republican Steve Hilton leads the tally in the state’s gubernatorial primary, followed closely by Democrat Xavier Becerra, with another Democrat, Tom Steyer, a few percentage points behind.

The top two vote-getters go through to November’s general election.

In the race for Los Angeles mayor, Republican Spencer Pratt is currently in second place and appears poised to challenge Democratic incumbent Karen Bass in the run-off, with a left-wing Democrat in third place.

But election officials say with many votes still to be counted in both contests, neither result is yet certain.

On Thursday, Trump lashed out at the process, effectively declaring that his favored candidates had already won.

“They are trying to STEAL THE GOVERNOR OF CALIFORNIA PRIMARY, AND THE MAYOR OF LOS ANGELES, PRIMARY, AWAY FROM TWO GREAT REPUBLICAN CANDIDATES. Here we go with the very late and massive numbers of MAIL IN BALLOTS,” he wrote on his Truth Social platform.

Ballots in California are mailed out to all registered voters and are valid if they are postmarked by Election Day, meaning some do not even arrive at the counting center until several days after polls close.

The process — and the sheer size of the state of 40 million people — means California is always slow to finalize results, a fact that frustrates voters of all stripes.

However, there are no documented examples of large-scale fraud capable of influencing election results.

The facts have not stopped Trump from alleging wrongdoing.

Opponents say the president’s repeated attempts to cast doubt on US elections could be a precursor to an effort to undermine the November midterms, in which his Republican Party is expected to lose significant ground.