The son of one of the founding members of Palestinian Hamas, who gathered intelligence on his father's group for Israel, has been granted asylum by a US immigration court.
Mosab Hassan Yousef had faced to opposition to his asylum resquest from the US government, who thought he may pose a security threat to the country.
But officials dropped their concerns for the most recent hearing, paving the way for the 32 year-old to be granted political asylum.
Yousef argued that he would be killed if he was deported because of his history of spying for Israel's Shin Bet intelligence agency. He had also abandoned Islam to become a Christian.
The Department of Homeland Security had initially turned down Yousef's asylum application because of his links to Hamas, which the US deems a terrorist organisation.
But Yousef says he only took part in Hamas activities to carry out his work as a Shin Bet operative.
"Yes, while working for Israeli intelligence, I posed as a terrorist," Yousef wrote on his blog last month.
"Yes, I carried a gun. Yes, I was in terrorist meetings with Yasser Arafat, my father and other Hamas leaders. It was part of my job"
Mosab Hassan Yousef,
former Shin Bet spy
"Yes, I carried a gun. Yes, I was in terrorist meetings with Yasser Arafat, my father and other Hamas leaders. It was part of my job."
Speaking outside Wednesday's hearing, Yousef said he was helping to fight terrorism.
"I will keep fighting the ideology that is behind terrorists because I know how they think. I know that this is the real danger that is facing liberty, facing freedom, facing humanity," he said.
Yousef's successful asylum bid comes after he launched a high profile campaign to rally support for his application, gaining the endorsement of members of congress, national security experts and Christian leaders.
He even persuaded his former Shin Bet handler to come forward and act as a character witness in the immigration case.
"Basically, I wanted to say that Mosab was not a terrorist," Gonan Ben-Itzhakm, who had travelled to the US for the hearing, said.
"He was not affiliated with Hamas."
Yousef recently published his memoirs, detailing his time as the one of Shin Bet's most important informants. He was known in the organisation as the "Green Prince", a reference to his father's position within Hamas and the group's signature colour.
He claims that as a young man he became disillusioned after witnessing Hamas brutality and began spying for Israel when offered a deal by Shin Bet during a stint in prison.
His father, Sheik Hassan Yousef is currently serving a six year sentence in an Israeli prison for his role in Hamas. He disowned his son in March after learning what he had done.
It is unclear why US authorities dropped their opposition to offering Yousef asylum, but it meant that the judge was able to grant the former spy leave to remain in the US after he is fingerprinted and undergoes routine security checks.