Social media, TV and calls from the mosques all helped Turks to repel the attempted coup.
Throughout history, new methods of communication have had a huge impact on the ability of movements to outmanoeuvre their opponents.
In the 16th century the printing press was used by Martin Luther to spread his protestant doctrine throughout Europe.
Audio cassettes helped Ayatollah Ruhollah Khomeini to spread his revolutionary rhetoric in Iran.
In 1980, then-Chief of the Turkish General Staff Kenan Evren appeared on state TV to inform the Turkish public that the army had taken the control of the state.
On Friday night, Turks used both old and new means of communication including TV, Twitter, Facebook and FaceTime to repel the attempted coup in Turkey.
Social media: a crucial tool in mobilising support
Turks first learnt that Istanbul's Bosphorus Bridge and Fatih Sultan Mehmet Bridge were closed by the military through posts on Twitter and Facebook before the Dogan News Agency showed vehicles being diverted.
People living in Ankara shared posts saying they had heard gunshots reverberate in the capital where military jets and helicopters were seen flying overhead.
Later it was understood that a minority faction within the Turkish military attempted to take control of the Turkish state.
The Turkish prime minister posted tweets to provide people with immediate information about the situation.
''Ordunun iinde bir grubun kalkma giriimidir. Bu giriime izin verilmeyecektir. Bunu yapanlar en ar bedeli deyeceklerdir."— T.C. Babakanlk (@TC_Basbakan) July 15, 2016
The moment which marked the beginning of the repulsion of the coup was when Turkish President Recep Tayyip Erdogan appeared on a private TV channel CNN Turk on FaceTime.
Surreal.. Pr Erdogan makes a statement through facetime pic.twitter.com/vmsiV2FPj6— Ziya Meral (@Ziya_Meral) July 15, 2016
He urged Turks to take to the streets and protest.
People used social media to organise mass rallies in big cities across Turkey.
Thousands flooded the streets in response.
Mosques called on people to rally against the coup
Special prayers were recited from almost 85,000 mosques across the country throughout the night to rally people against the coup plotters.
President of the Ministry of Religious Affairs Mehmet Gormez told a private TV channel that "As a nation who wasn't disturbed by the barrel of tanks pointed at the people or the sounds of F-16s flying overhead, I do not see anyone in this land who would be disturbed by the sound of sela. This tradition will continue."
The role of TV
The coup plotters knew that TV has a significant influence on people in Turkey, especially among older generations. This was why they raided several TV buildings in Istanbul and Ankara.
One of the tensest moments of the coup was when people saw Turkish anchorwoman Tijen Karas on Turkey's state-run TV channel TRT reading out a declaration written by pro-coup soldiers.
She was shivering from fear as she was forced to read the statement by the soldiers who had taken the TRT building in Ankara.
However, this time things went differently than in previous coups when the only TV channel in Turkey was TRT.
Private TV channels NTV, CNN Turk, Haberturk and many others continued broadcasting despite the attempted coup, with their reporters giving live information from the field.
Politicians appeared on TV channels encouraging people to go to streets to stop the coup plotters.