A Peruvian judge on Monday dismissed a prosecutor's request for the detention of corruption-accused presidential hopeful Keiko Fujimori while the country awaits the outcome of June 6 elections in which she vied for the top job.

Fujimori, who narrowly trails leftist rival Pedro Castillo according to the unconfirmed vote count, risks an imminent corruption trial if she loses the race.

If she wins, it will be delayed until after her term.

Fujimori has already spent 16 months in pre-trial detention on charges of taking money from scandal-tainted Brazilian construction giant Odebrecht to fund failed presidential bids in 2011 and 2016. She denies the charges.

Fujimori was conditionally freed in May last year due to the coronavirus outbreak, and was barred from leaving Peru or communicating with co-defendants or witnesses in the case.

Prosecutors have said they would seek a 30-year jail term for the 46-year-old daughter of corruption-convicted ex-president Alberto Fujimori.

On June 11, a few days after the election, prosecutor Jose Domingo Perez accused Fujimori of having been in contact with witnesses in violation of the conditions for her provisional freedom, and asked a court to return her to custody.

The witness, Miguel Angel Torres, had accompanied Fujimori to a post-election press conference as an advisor.

But on Monday, after a hearing of several hours, judge Victor Zuniga ruled "unfounded" the request for Fujimori's parole to be rescinded.

Fujimori was present for the hearing with her lawyer Giuliana Loza, and prosecutor Perez, who said he would appeal the ruling.

Keiko Fujimori faces an imminent corruption trial if she loses the presidential race
Keiko Fujimori faces an imminent corruption trial if she loses the presidential race AFP / Janine Costa

Perez had argued that Fujimori must be ordered back in detention "because of the seriousness of the crimes she is accused of," adding she "systematically violated the rules of conduct of not communicating with witnesses."

For her part, Fujimori said the prosecutor's request was "arbitrary, disproportionate and unjust," as dozens of her supporters demonstrated outside.

Dismissing the request, the judge cautioned Fujimori to strictly adhere to her parole conditions in future.

Castillo took 50.12 percent of the vote in the June 6 runoff election, holding a lead of some 44,000 votes over Fujimori, according to the unconfirmed count.

The final result is being held up by a review of disputed votes, mainly from the camp of Fujimori, who has alleged widespread fraud.

She repeated her claims Monday, urging supporters on Twitter to come forward with evidence "of how Peru Libre cheated," referring to the party of Castillo.

The leftist rural school teacher has rejected calls from Fujimori supporters for the election to be annulled.

Supporters of both candidates took part in demonstrations over the weekend demanding an end to the uncertainty.