LONDON — British authorities Tuesday blocked a longstanding demand for the extradition of Gary McKinnon, a computer hacker wanted in the United States to face charges of intruding into Pentagon computer networks in a case that has become a touchstone of the delicate jurisdictional balance between the two countries since the attacks of Sept. 11, 2001.

McKinnon, 46, who has been facing the accusations for a decade, suffers from Asperger’s syndrome and is prone to depression, British officials said.

In light of the ‘‘high risk’’ that the suspect would commit suicide if sent to the United States, Home Secretary Theresa May told Parliament, she had ‘‘withdrawn the extradition order against Mr. McKinnon’’ to safeguard his human rights.

US prosecutors say McKinnon gained unauthorized access to 97 government computers between February 2001 and March 2002, causing damage worth $566,000. While he has admitted hacking into Pentagon networks, he insists that he did so to seek evidence about unidentified flying objects.

US officials have described his actions as ‘‘the biggest military computer hack of all time.’’

US authorities sought his extradition under a 2003 treaty that, British critics of the legislation assert, was designed to help prosecute terrorists but has been misused by US prosecutors as a catch-all measure in less onerous cases unrelated to national security.

May’s ruling was said by legal specialists to mark the first time that Britain had publicly thwarted a US demand made under the contentious treaty, which enables US authorities to seek extradition of suspects without providing substantive evidence of their purported crimes.

“Mr. McKinnon is accused of serious crimes,’’ May said. ‘‘But there is also no doubt that he is seriously ill. He has Asperger’s syndrome, and suffers from depressive illness. The legal question before me is now whether the extent of that illness is sufficient to preclude extradition.

‘‘After careful consideration of all of the relevant material, I have concluded that Mr. McKinnon’s extradition would give rise to such a high risk of him ending his life that a decision to extradite would be incompatible with Mr. McKinnon’s human rights.’’

British critics of the extradition treaty have said the pact effectively outsources British judicial responsibilities to the United States without securing reciprocal benefits or distinguishing between serious and lesser crimes.

David Blunkett, the former home secretary who signed the treaty, said in 2010 that he may have ‘‘given too much away’’ to the US prosecutors when the pact was framed.

In 2011, British legislators urged the government to reform the procedures. Dominic Raab, a lawmaker for the governing Conservatives, said at the time that McKinnon should not be treated ‘‘like a gangland mobster or Al Qaeda mastermind.’’

Rights campaigners hailed the ruling. Shami Chakrabarti, the head of the civil rights group Liberty, called it ‘‘a great day for rights, freedoms, and justice in the United Kingdom.’’

McKinnon was first arrested in 2002, and then again in 2005. An order for his extradition was made in July 2006 under the 2003 treaty, but McKinnon’s family, his lawyers, and rights campaigners began a series of legal battles.

The case has generated such intense interest in Britain that Prime Minister David Cameron discussed it with President Obama, British officials said.

His immediate fate in the British justice system remained unclear.

In 2009, the Crown Prosecution Service said that while the evidence against McKinnon justified charges of ‘‘unauthorized access with intent,’’ it ‘‘does not come near to reflecting the criminality that is alleged by the American authorities.’’

The ruling Tuesday came days after the British authorities ended another long-running extradition battle by sending five terrorism suspects, including cleric Abu Hamza al-Masri, to face trial in the United States on an array of charges. The men had been resisting extradition for many years.