An Iraqi-born cleric convicted of making death threats against a Norwegian politician and intimidating witnesses has walked free from prison.

Mullah Krekar, a 58-year-old Kurd known as Najmaddin Faraj Ahmad, served nearly three years in prison. Relatives collected him Sunday from Kongsvinger prison near Oslo.

Outside the gates, Ahmad kissed the snowy ground. He thanked prison officials for being "good people serving in a bad system, such as the one in North Korea."

Ahmad came to Norway as a refugee in 1991. He was convicted in 2012 of making death threats against other Kurdish immigrants and a Norwegian party leader.

Norway and the United States have accused Ahmad of financing a defunct Iraqi Sunni insurgent group called Ansar al-Islam. It reportedly merged with the Islamic State group last year.