Leaked US embassy cables reveal that Gordon Brown unsuccessfully put his reputation as prime minister on the line in a plea to Washington that the computer hacker Gary McKinnon be allowed to serve any sentence in the UK.

Brown's face-to-face attempt to strike a deal with the US ambassador was spurned by the Obama administration, in a humiliating diplomatic rebuff.

Washington now appears to be just as intransigent with Brown's successor, David Cameron. The Cameron government has failed to announce whether or not it will comply with continued US demands to hand over McKinnon after he hacked into their government computers.

The Labour chairman of parliament's home affairs committee, Keith Vaz, said: "A decision still has not been made on the case of Gary McKinnon more than six months after the home secretary said that the issue would be looked at."

McKinnon's mother, Janis Sharp, is due to testify to Vaz's committee this morning as it launches a hearing into the extradition demands.

Brown made his unsuccessful direct intervention in August 2009, according to a secret cable from the US ambassador in the UK, Louis Susman, to the secretary of state, Hillary Clinton.

Susman wrote: "PM Brown, in a one-on-one meeting with the ambassador, proposed a deal: that McKinnon plead guilty, make a statement of contrition, but serve any sentence of incarceration in the UK. Brown cited deep public concern that McKinnon, with his medical condition, would commit suicide or suffer injury if imprisoned in a US facility."

The ambassador says he sought to raise Brown's request in Washington with Obama's newly appointed attorney general, Eric Holder. But the plea got nowhere.

In October last year, the ambassador had to warn Clinton on a visit to the UK that the prime minister was likely to raise the McKinnon case again.

"McKinnon has gained enormous popular sympathy in his appeal against extradition; the UK's final decision is pending." he reported. "The case has also caused public criticism of the US-UK extradition treaty."

One reason for Brown's failure may have been barely contained US rage, spelled out in other secret cable traffic around the same time, that the UK was releasing the convicted Lockerbie bomber, Ali Abdelbaset al-Megrahi, to what turned out to be a hero's welcome in Libya.

McKinnon, who has Asperger's syndrome, an autism spectrum disorder, claims he only hacked into US computer systems in 2001-02 to search for evidence of UFOs.

Last December, Cameron, then leader of the opposition, joined in making representations, although in a more low-key way. After he raised the subject with Susman, the two men had another meeting covering a range of topics: "Cameron said he had raised the extradition with the ambassador in an earlier conversation because the case was a matter of concern for many in the British public. British people generally feel McKinnon is guilty 'but they are sympathetic', Cameron said."

The ambassador recorded, however, that Cameron had "noted that neither McKinnon's lawyers nor his mother had been in touch with him".

This year, as prime minister, Cameron has taken more high-profile ownership of the case of McKinnon, who faces a possible 60-year sentence.

In July he publicly raised McKinnon's case with President Obama on a visit to the White House, and drew praise from UK newspapers who have taken up McKinnon's cause. But in the event the US administration seems to have proved no more willing to do a deal on McKinnon with Cameron than with Brown.

Cameron promised that the home secretary, Theresa May, would take a final decision whether or not to comply with continued US extradition demands. He also launched a review of the controversial US-UK extradition treaty, under Lord Justice Scott Baker.