The son of a founder of the Palestinian Islamist group Hamas is to be granted asylum in the US, a judge has ruled.
Mosab Hassan Yousef said he became a spy for Israel's intelligence service and converted to Christianity before moving to California in 2007.
He went public earlier this year when he published his memoir called Son of Hamas.
Mr Yousef argued he would be killed if he was deported to the Palestinian territories.
Judge Rico Bartolomei ruled that Mr Yousef will be allowed to remain in the US pending a routine background check, Associated Press news agency said.
The ruling came after the US government dropped its objections to Mosab Hassan Yousef's asylum request, which was initially rejected last year.
It is not clear why the US Department for Homeland Security overturned its previous objections to the request.
Mr Yousef, 32, is a son of Sheikh Hassan Yousef, a senior Hamas figure in the West Bank, who is currently serving a six-year term in an Israeli prison.
His father has disowned him.
Mr Yousef said he turned against Hamas during a spell in an Israeli jail when he witnessed Hamas brutalities.
He started spying for Israel's intelligence service, Shin Bet, and in his memoir said he played a role in preventing Hamas attacks on Israel.