ISTANBUL — Turkey's government on Sunday issued an emergency decree dismissing thousands of public servants for alleged links to terror groups.

The decree, published in the Official Gazette, sacked 18,632 civil servants, including nearly 9,000 police officers, some 6,000 members of the military and hundreds of teachers and academics. Their passports will be cancelled.

Turkey has been under a state of emergency for nearly two years, declared after a failed coup attempt in July 2016. The government blames a U.S.-based cleric for orchestrating the coup and has sacked or arrested people suspected of links to him. The cleric, Fethullah Gulen, denies the allegations. But the purge has broadened to include other "terror groups," with more than 130,000 people dismissed.

The decree is expected to be the last of a series of emergency laws as Turkey's ruling system will fully transform into an executive presidency Monday, following last month's elections. The cabinet and administrative structure will be completely revamped, coming under the authority of President Recep Tayyip Erdogan.

Sunday's decree also reinstated 148 people previously sacked through emergency decrees, while annulling the ranks of some 1,500 retired military and police officers, depriving them of their pensions and passports.

Twelve non-governmental organizations, three newspapers and one television station were also shuttered through the 461-page ruling.

More than 75,000 people have been arrested for alleged links to Gulen.

The current state of emergency ends on July 18, unless extended for another term by the president and approved by parliament. Erdogan has hinted it may be lifted.