Turkey's state of emergency which was imposed after the failed 2016 coup is to end Wednesday but the opposition fears it will be replaced by even more repressive legislative measures.
President Recep Tayyip Erdogan 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 measure, which normally lasts three months but was extended seven times, has seen the detention of some 80,000 people and about double that number sacked from jobs in public institutions.
The biggest purge of Turkey's modern history has targeted not just alleged supporters of Fethullah Gulen, the US-based preacher blamed for the coup, but also Kurdish activists and leftists.
The 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, which he won, Erdogan pledged that the state of emergency would end.
And it will -- at 1:00am on Thursday (2200 GMT Wednesday), simply by virtue of the government not asking that it be extended.
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 on Thursday and then in plenary session on Monday.
The main opposition Republican People's Party 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.
Want stories like this in your inbox?
Sign up to exclusive daily email
More Stories from Middle East