Why did Turkey declare and lift its state of emergency?

“The Western world’s expectations of help and partnership from Turkey on important matters is in vain; it must first understand and respect Turkey’s struggle against terrorism and provide intelligence, logistical and psychological support for its ally against common enemies.”

Anatomy of the July 15 coup attempt two years later

“The Western world did not side with Turkey’s people and democracy following the coup. What’s more, it used the administration’s fight against terror organizations – FETO foremost among them – to criticize Turkey.”