The Turkish government has ended the nationwide state of emergency that was imposed two years ago after a failed coup attempt. The Turkey emergency ceased to be in force from 19 July.

The decision comes weeks after President Recep Tayyip Erdogan won re-election, BBC reported on Wednesday.

Under the state of emergency, tens of thousands of people were arrested or dismissed from their jobs. However, the government has decided against extending it again after seven three-month renewals.

The Turkey emergency has seen detention of some 80,000 people and about double that number sacked from jobs in public institutions, , according to official statistics and NGOs.

OPINION | Turkey’s monolith

Many of those dismissed are alleged to be supporters of the exiled Islamic cleric Fethullah Gulen, who lives in the US and is a former ally of Erdogan.

Turkey accuses Gulen and his followers of organising the coup, but he denies it.

During the election campaign, opposition candidates had said removing the state emergency would be the first thing on their agenda if voted to power.

President Recep Tayyip Erdogan had declared the state of emergency on July 20, 2016, five days after warplanes bombed Ankara and bloody clashes broke out in Istanbul in a doomed putsch bid that claimed 249 lives.

The opposition, however, still fears the emergency will be replaced by even more repressive legislative measures.

Former leaders of the opposition pro-Kurdish Peoples’ Democratic Party (HDP) — Figen Yuksekdag and Selahattin Demirtas — are still languishing in jail following their arrest in November 2016 on charges of links to Kurdish militants.

During last month’s presidential election campaign, Erdogan too pledged that the state of emergency would end, which did at 1 am on Thursday (2200 GMT Wednesday).

But the opposition has been angered by the government’s submission of new legislation to parliament that apparently seeks to formalise some of the harshest aspects of the emergency.

The bill, dubbed “anti-terror” legislation by pro-government media, will be discussed at commission level tomorrow and then in plenary session on Monday.

The main opposition Republican People’s Party (CHP) said the new measures would amount to a state of emergency on their own.

“With this bill, with the measures in this text, the state of emergency will not be extended for three months, but for three years,” said the head of the CHP’s parliamentary faction, Ozgur Ozel. “They make it look like they are lifting the emergency but in fact they are continuing it,” he added.

Under the proposed legislation, the authorities will retain for three more years the power to sack civil servants deemed linked to “terror” groups, retaining a key power of the state of emergency.

Protests and gatherings will be banned in open public areas after sunset, although they can be authorised until midnight if they do not disturb the public order.

Local authorities will be able to prohibit individuals from entering or leaving a defined area for 15 days on security grounds. And suspect can be held without charge for 48 hours or up to four days in the case of multiple offences. This period can be extended up to twice if there is difficulty in collecting evidence or if the case is deemed to be particularly voluminous.

The authorities have also shown no hesitation in using the special powers of the emergency — right up to its final days. Following a decree issued on July 8, 18,632 people were sacked — 8,998 of them police officers — over suspected links to terror organisations and groups that “act against national security”.

The move came just two weeks after Erdogan was reelected under a new system that gives him greater powers than any Turkish leader since the aftermath of World War II.

The new executive presidency means government ministries and public institutions are now centralised under the direct control of the presidency. Erdogan says it is necessary to have a more efficient government but the opposition claims it has placed Turkey squarely under one-man rule.

“The end of the state of emergency does not mean our fight against terror is going to come to an end,” said Justice Minister Abdulhamit Gul.