He stole about 10,000 database records containing the personal details of women which he later intended to publish.

BPAS Chief Executive Ann Furedi thanked the police for their "swift action," adding that "it was one of the most extreme examples of anti-abortion activity we have seen."

Jeffery had also "defaced" the website's homepage with the logo of the hacking group Anonymous and posted an anti-abortion sentiment Prosecutor Daniel Higgins told the court

Jeffery wrote on the BPAS website: "An unborn child does not have an opinion, a choice or any rights.

"Who gave you the right to murder an unborn child and profit from that murder?

"The product abortion is skilfully marketed and sold to the woman at a crisis time in their life. She buys the product, finds it defective and wants to return it for a refund but it is too late."

He signed off using his online alias Pablo Escobar - named after the Colombian drug lord, Mr Higgins said.

The former software engineering student then boasted about his hacking feat on Twitter.

Police swooped on his home in Castle Street, Wednesbury, West Midlands, in the early hours of March 9, after they traced him through his IP (internet service provider) address.

Jeffery, who admitted two offences under the Computer Misuse Act at an earlier hearing, targeted the BPAS website after two women, to whom he was close, had abortions.

He accomplished the hacking using a "learning penetration testing software" which identifies "vulnerabilities" in websites, the court heard.

"He boasted on his twitter account that he had access to the website," said Mr Higgins.

"In order to demonstrate that he had hacked the website, he posted the log-on details of Clare Murphy, who is the head of communications at the charity."

When Jeffery was arrested, police found his computer "in the process of being wiped clean".

The court was told that he intended to publish the data, which included names, email addresses and telephone numbers on an online sharing site but later changed his mind.

The court heard that he did not access medical information about any of the women.

Mr Higgins said: "Clare Murphy states women who contact the charity are often in a vulnerable situation.

"They speak to teenagers who have not disclosed their pregnancy to their parents, women who have been victims of domestic violence and victims of sexual violence - many women for whom an unplanned pregnancy is a very private affair and would not wish to share this with others.

"The publication of the information would cause great anguish for women who contact the charity in confidence and would put some of these women at serious risk mentally and physically."

Sentencing, Judge Michael Gledhill QC said: "You only have to think for a few seconds of the terrible consequences had that threat been carried out."

Judge Gledhill said that at the time of the offences, Jeffery held strong views about abortion.

"Just as many people disagree with the view you held, many do agree," the judge said.

"However, those who find abortion repugnant do not use this as an excuse to justify deliberately committing offences."

Judge Gledhill continued: "Your skills are so good that you decided to hack into their (BPAS's) website and you succeeded.

"You stole the records of approximately 10,000 women. Many of them were vulnerable women, vulnerable simply because they had had a termination or because of their youth or because their family did not know about their situation.

Mitigating, Shaun Wallace, told the court that Jeffery had entered the website to test its vulnerability, adding: "The more curious he became, the less responsible he became.

Mr Wallace said that Jeffery was a "part-time" member of the hacking group Anonymous.

But the court was told that Jeffery had contact with hacker "Sabu" - possibly the same Sabu who was unmasked as notorious Lulzsec leader and influential Anonymous member Hector Xavier Monsegur, who now works as an informant for the FBI.

The pair spoke about their shared interest in music since February last year, Mr Wallace said.

Jeffery wrote BPAS a letter of apology expressing his remorse for the attack and suggested ways that the charity could improve website security.

The court was told that Jeffery also admitted to police he had identified "vulnerabilities" on a string of websites for major international organisations including the FBI, CIA, West Midlands Police, the Houses of Parliament, the US navy, Arizona police and Spanish police.

BPAS is a non-statutory abortion provider which treats around 55,000 people per year.

The not-for-profit charity also provides counselling for unplanned pregnancy and abortion treatment and gives advice about contraception, sexually-transmitted infection testing and sterilisation.