More than two thousand soldiers in Turkey have been arrested after trying to take control of the country.
Turkey's Prime Minister Binali Yildirim says that the attempt to overthrow the government - called a 'coup' - has now finished, and the government is still in power.
Reports from the country say more than 160 people have died during fighting between members of the coup and those loyal to the government.
What is a coup?
A coup is when a group attempts to take over the government.
Coups are often launched by the military in a country, and that's what happened in Turkey.
Why did it happen?
The attempted coup happened because lots of people in Turkey disagree over President Erdogan's plans for the country, and because of his involvement in the war in Syria.
In Turkey, some people think Erdogan is becoming too controlling as a leader and has too much power.
The group behind the coup said that they want to take control back, and to protect things like democracy, human rights, and freedoms in the country.
But the Turkish Prime Minister called the attempt a "black stain on Turkish democracy".
Why is it important?
Turkey is a big country, and plays an important role in the region.
It's right next to Syria, so is seen as being involved in the war there. President Erdogan's government has been a big supporter of those who oppose the Syrian government, and Turkey is now home to almost two million refugees who have fled the fighting in Syria.
Turkey is a member of Nato - a big military union whose members also include the UK and United States. Nato has said that people should respect Turkey's democratic institutions.
It's also a place where lots of people go on holiday, including people from the UK.
There haven't been any reports of people on holiday being hurt, but the government has advised travellers in Turkey to be careful and stay away from public places. Some flights have also been cancelled.
What's happening now?
On Saturday around 200 unarmed soldiers surrendered to police, according to the government.
Prime Minister Yildirim said that the situation is now "completely under control", with the government back in charge.
More than two thousand soldiers have been arrested by Turkish police for taking part in the coup attempt.