Six Pakistan high court judges have accused the nation's intelligence agency of intimidating and coercing them over "politically consequential" cases in a letter seen by AFP on Wednesday.

Pakistan's military -- which runs the Inter-Services Intelligence (ISI) spy agency -- has long been accused of wading into civilian affairs, but the missive is a rare rebuke to their mostly unquestioned power.

In the lead-up to Pakistan's February 8 elections, analysts said the military was leaning on the courts to sideline opposition leader Imran Khan, who was eventually jailed and barred from running.

Some of the nearly 200 cases brought against the former cricket star were heard at Islamabad High Court, where six judges signed the letter to the Supreme Judicial Council watchdog.

The letter, dated Monday, makes numerous allegations including that in March 2023, "considerable pressure was brought to bear" on judges "by operatives of the ISI" over a case facing Khan.

"Fearing for their security, they sought additional protection for their homes," the letter said.

It also alleges a judge's brother-in-law was abducted by "individuals who claimed to be operatives of the ISI" and "tortured into making false allegations".

On another occasion, a judge was said to have found secret cameras in his living room and bedroom.

"We believe it is imperative to inquire into and determine whether there exists a continuing policy on part of the executive branch of the state, implemented by intelligence operatives who report to the executive branch, to intimidate judges, under threat of coercion or blackmail, to engineer judicial outcomes in politically consequential matters," the letter reads.

An official at Islamabad High Court who asked to remain anonymous confirmed to AFP that the letter was delivered on Tuesday to the Supreme Judicial Council, which oversees the courts.

Pakistan's powerful military establishment has directly ruled the nation for roughly half of its 76-year history and continues to exercise enormous power behind the scenes.

Michael Kugelman, director of the South Asia Institute at the Woodrow Wilson International Center for Scholars in Washington, said the letter showed "the extent of interference in the legal process, at the highest levels".

"That says a whole lot about just how deep and extensive and serious the establishment's interference is these days -- in the law, but also in politics and public policy," he wrote on social media site X.

The Pakistan military's public relations wing did not immediately respond to a request for comment.

Khan, 71, fell out with the military establishment that boosted him into office in 2018, and was ousted from power by a parliamentary no-confidence vote in 2022.

In opposition, he and other senior members of his Pakistan Tehreek-e-Insaf (PTI) party were deluged by court cases that hobbled their campaigning for last month's election.

Despite that, candidates loyal to Khan won more seats than any other party. However, a coalition of army-aligned parties took power, headed by Prime Minister Shehbaz Sharif.

A statement released on Khan's X account said "the fact that the judges have been intimidated and coerced into giving judgments based on political expediency raises a lot of questions on the fairness of the courts and their judgments over the last two years".