Saudi Arabia has released 166 former terrorists belonging to al-Qaida and other militant organisations after they were "reformed."

A top Saudi official said the militants had undergone long-term "rehabilitation programmes" aimed at making them re-enter society.

Mansour al-Turki, the interior ministry spokesperson, said the former insurgents have been reformed through the state-sponsored counselling programme (Munasaha).

"A group of 62 members of the deviant group were released in Jeddah after they completed the counselling programme at the Prince Mohammed Bin Naif Centre for Counselling and Care," said the spokesperson, adding that the remaining 104 former militants were set free in Riyadh.

Although the officials did not provide their past affiliations, reports suggest most of them were linked to al-Qaida or its allied outfits.

According to an Arab News report, none of those released were women.

The ex-prisoners will also participate in further rehabilitation programmes in order to cope with reintegration into society.

The former militants, even though released, will be kept under the watch of government agencies for a brief while. Authorities said the government will also help them secure their original jobs and fresh employment.

The rehabilitation programme is aimed at encouraging convicts to turn over to moderate Islam.

In Saudi Arabia, the death penalty is still in vogue for crimes which include blasphemy, idolatry, sorcery, and drug-trafficking.