The Government must examine MI5's professionalism and competency after the security agency "needlessly and unfairly" pursued an innocent woman accused of being a spy, her lawyer said tonight.
Tessa Gregory spoke out after Russian Katia Zatuliveter, 26, won an appeal to remain in the UK after the Security Service argued she was passing information to Moscow.
Miss Zatuliveter was arrested in December last year and served with a deportation order after spooks became suspicious of her.
She had embarked upon an affair in 2006 with Mike Hancock MP, and went on to work for him in Parliament where he sat on the Defence Select Committee.
MI5 alleged she was recruited by Russian intelligence and working to pass them information.
Her case was heard by the secretive Special Immigration Appeals Commission (Siac) with large chunks of evidence heard behind closed doors with even Zatuliveter and her lawyers excluded.
But today, appeal chairman, Mr Justice Mitting, ruled there was insufficient evidence and the Home Secretary's case against Miss Zatuliveter was not strong enough to deport her.
After hugging her client, Miss Gregory slammed the Government and MI5.
Describing the ruling as "historic", Miss Gregory said: "We trust that the Government will reflect very carefully on today's judgment which must raise serious concerns as to the professionalism and competency within the Security Service."
Miss Gregory said her client had lived a "Kafkaesque nightmare" for the last year and had to air personal details about her relationship with Mr Hancock, 65, and a series of other men she had affairs with.
She said: "Katia is, of course, delighted by the judgment and hopes to now put this episode behind her.
"However, it should not have taken 12 months of costly legal proceedings to reach today's outcome.
"If the Security Service, like the court, had rigorously analysed the available evidence, they would never have concluded that she was a Russian spy and we would not be here today.
"Our Security Service is supposed to be responsible for protecting us against serious threats to national security.
"It is therefore extremely worrying that they have chosen to waste their time, at great public expense, needlessly and unfairly pursuing an innocent young woman.
"Their case was built entirely on speculation, prejudice and conjecture.
"It was amateur, poorly researched and compared very unfavourably to the counter-espionage work conducted by the FBI in recent years."
Emerging from the central London hearing, Miss Zatuliveter, who is being represented by a media handler and is expected to sign an exclusive deal to sell her story, said: "I feel fine. I am very happy, incredible relief. My parents are ecstatic."
In his written ruling, the judge said the panel - which featured former MI5 boss Sir Stephen Lander - "unhesitatingly accept" the intelligence service's assessment that Mr Hancock, MP for Portsmouth South, would have been "of long-standing interest to one or more of the Russian intelligence agencies".
Mr Justice Mitting wrote: "Even if she was approached in Russia by the FSB/SVR (two of the country's three intelligence agencies), we have seen nothing which satisfies us that she was recruited as an agent or was tasked, or acted, as one.
"We have not reached that conclusion by a narrow margin."
The judge said Miss Zatuliveter would have "been of great interest" to Russian intelligence "but they (her activities) are also entirely consistent with her being an ambitious young woman with an intense interest in politics and international relations".
But the possibility still exists that Miss Zatuliveter - who is due to return home for a short break before returning to the UK - is a spy.
"We cannot exclude the possibility that we have been gulled," the judge added.
"But if we have been, it has been by a supremely competent and rigorously trained operative.
"That does not fit all that we know about the appellant's age, background and characteristics."
The Home Office said it was disappointed with the ruling.
A spokeswoman said: "National security is the primary duty of government and we will take all necessary steps to protect the public from individuals we believe pose a threat and remove them from the UK.
"The court ruled that there were ample grounds for suspicion.
"We are therefore very disappointed by the court's judgment and stand by our decision to pursue deportation on national security grounds."