Jordan’s parliament on Monday passed a heavily-debated royal pardon set to release thousands of Jordanians and hundreds of guest-workers from the country’s prisons.

On Monday, the Lower House voted by a majority to approve a general pardon law introduced by the government and heavily amended by lawmakers and the Senate. The decision ended a month of debates inside parliament and in cafes and homes across the country.

King Abdullah had ordered the government on December 12 to issue a pardon to “contribute to alleviating the economic burden and difficult conditions citizens are going through,” at a time of ongoing discontent and sporadic protests over the economy.

The passed law offers amnesty for dozens of crimes including traffic violations, unpaid government fines, and certain cases of manslaughter. According to government estimates, the pardon will result in 8,000 Jordanians and guest workers freed from the country’s prisons – nearly half the estimated 17,000 prison population.

The pardon is to come into effect after being endorsed by King Abdullah by a royal decree, expected this week.

The law includes 25 major exceptions deemed unpardonable such as terrorism, treason, espionage, and financial crimes such as tax evasion and abuse of public funds.

One of the core changes made by lawmakers to the government’s pardon was to include citizens charged with abuse and possession of drugs in the pardon. The provision was added in order to “help drug abusers resume normal lives and re-integrate into society,” lawmakers said, as cited by the Jordan News Agency, Petra.

Lawmakers also added a stipulation granting amnesty to foreign guest workers who have violated or overstayed their residence permits, waiving their fines and requiring workers to rectify their status within 180 days.

Fierce debates and disputes erupted over whether to include civil cases in the pardon, particularly the case of bounced cheques and defaulted loans – which activists say is the most common crime placing Jordanians, mainly women, in jail.

Jordan’s Senate overruled the Lower House in the final law, requiring plaintiffs – individuals, banks or corporations – to put forward an official motion dropping charges or indicating that a settlement has been reached in order for debtors to be released.

The issue of Jordanian debtors had been a common demand by citizens and in street protests, with families of imprisoned Jordanians gathering in front of parliament each day for the past month.

Although the pardon did not include debtors, deputy prime minister Rajai Muasher told senators on Sunday that the government is considering ending the practice of imprisoning persons for issuing bad cheques in favour of alternatives such as travel bans and progressively increasing fines.

The pardon comes at a time the government looks to gain good-will among an increasingly pessimistic public fretting over the economy, tax hikes and corruption.

The vast majority of Jordanian citizens, 73 per cent, support a general pardon, according to a public opinion survey by the Center for Strategic Studies at University of Jordan carried out in mid-January.

The pardon would mark the third issued by King Abdullah since his ascension to the throne in 1999. His first pardon issued months into his reign benefited several thousand citizens. A second amnesty issued amid street protests and the Arab uprisings of 2011 saw the release of 3,500 prisoners.