Hong Kong: As security forces surrounded his home shortly after a state of emergency had been declared in the Maldives, 80-year-old ex-president Maumoon Abdul Gayoom deftly hit social media to tell the world of his impending arrest.

The government quickly sought to control the flow of information out of the famed Indian Ocean holiday islands following its declaration late Monday night, according to local media outlets and the Committee to Protect Journalists, an international watchdog.

However, Gayoom, opposition politicians and even the Supreme Court gave a blow-by-blow account of the dramatic events via Twitter, Periscope and other social media platforms.

Moments after posting a tweet stating that “a large number” of police had converged on his home, Gayoom calmly delivered a live video message that was aired by an opposition politician on her Periscope account.

“Right now, police are here to arrest me. I remain steadfast in my resolve,” Gayoom said in a quiet voice.

“I don’t know what charges they have against me. I have not done anything to be arrested. I urge you to remain steadfast in your resolve too,” he added.

“We will not give up on the reform work we are doing. I wish all Maldivians success. Remain courageous and I pray Allah almighty to direct us to the right path.”

When the Maldives’ top judge was arrested on Tuesday, officials from the Supreme Court similarly fought back via social media.

“BREAKING NEWS: THE NATIONAL DEFENSE FORCES OF THE MALDIVES HAVE BROKEN INTO THE SUPREME COURT OF THE MALDIVES,” said a post on @judiciarymv, the official account of the country’s top court.

After authorities detained Chief Justice Abdulla Saeed and another Supreme Court judge, it was unclear who had control of the account.

“This is to inform that the Supreme Court of the Maldives continues to function under the guidance of the Judicial Council,” another tweet on the account said.

Since coming to power in 2013, President Abdulla Yameen has presided over an escalating crackdown on dissent that has battered the image of the nation and left almost all the political opposition jailed.

The Supreme Court’s shock decision last week to order the release of political dissidents and quash the conviction of exiled opposition leader Mohammad Nasheed, among others, sparked the crisis.

Gayoom, president for 30 years until the country’s first democratic elections in 2008 and Yameen’s estranged half brother, was detained after he sided with the opposition.

The New York-based Committee to Protect Journalists released a statement after the state of emergency was declared condemning what it said was a government “attack” on the press.

“Authorities in the Maldives must immediately stop trying to exert control over the media and access to information,” Steven Butler, the CPJ’s Asia programme coordinator, said in a statement.

“The Maldives should abide by its constitutional commitment to the freedom of speech.”

The Maldives Broadcasting Commission warned media outlets last week they could be shut down if they were deemed a threat to national security, according to the CPJ.

Twenty-four-hour news channel RaajjeTV said Tuesday on Twitter it indeed feared such a fate.

“RaajjeTV shutdown ... imminent. Will continue to work for the people of the Maldives till the last minute,” it tweeted. “We have no security.”