A U.S. citizen jailed for nearly three years after he was captured on the battlefield in Afghanistan has returned to Saudi Arabia, where he was raised.

Yaser Hamdi arrived in Riyadh Monday after he was freed in a deal that requires him to renounce his U.S. citizenship, stay in Saudi Arabia for five years and vow not to sue the United States for his detention.

Mr. Hamdi was never formally charged after he was captured on an Afghan battlefield in November 2001 and accused of fighting for the Taleban. He was kept in solitary confinement and denied legal representation until the U.S. Supreme Court ruled this summer that he must face trial.

However, instead of pursing a trial, U.S. prosecutors negotiated a deal to free him.