Human rights group Amnesty International says it has received credible evidence of detainees in Turkey being subjected to beatings and torture, including rape, since last week's failed coup attempt.

"It is absolutely imperative that the Turkish authorities halt these abhorrent practices and allow international monitors to visit all these detainees in the places they are being held," said Amnesty's Europe director John Dalhuisen in a statement.

Erdogan has extended the maximum period of detention for suspects from four days to 30, a move Amnesty said increased the risk of torture or other maltreatment of detainees.

Tens of thousands of supporters of Turkey's ruling and main opposition parties, usually bitter foes, rallied together on Sunday in support of democracy following a failed military coup as President Tayyip Erdogan tightens his grip on the country.

"This is a day to unite, a day to stand up against coups and dictatorial regimes, a day to let the voice of the people be heard," he said at the rally, organised by his secularist opposition CHP but also backed by the ruling Islamist-rooted AK Party and by other opposition groups.

"We are all together in Taksim today. Today is a day we made history all together."

Erdogan will probably try to capitalise on the large size of the crowd of all political persuasions to try and reassert full control over the country, a NATO ally and an important partner in the US-led fight against Islamic State.

In pictures: Turkey coup attempt Show all 17 1 /17 In pictures: Turkey coup attempt In pictures: Turkey coup attempt Turkish President Erdogan attends the funeral service for victims of the thwarted coup in Istanbul at Fatih mosque on July 17, 2016 in Istanbul, Turkey Burak Kara/Getty Images In pictures: Turkey coup attempt Soldiers involved in the coup attempt surrender on Bosphorus bridge with their hands raised in Istanbul on 16 July, 2016 Gokhan Tan/Getty In pictures: Turkey coup attempt A civilian beats a soldier after troops involved in the coup surrendered on the Bosphorus Bridge in Istanbul, Turkey, 16 July, 2016 REUTERS/Murad Sezer In pictures: Turkey coup attempt Surrendered Turkish soldiers who were involved in the coup are beaten by a civilian Reuters In pictures: Turkey coup attempt Soliders involved in the coup attempt surrender on Bosphorus bridge Getty In pictures: Turkey coup attempt Supporters of Turkish President Recep Tayyip Erdogan wave flags as they capture a Turkish Army vehicle Getty In pictures: Turkey coup attempt People pose near a tank after troops involved in the coup surrendered on the Bosphorus Bridge in Istanbul, Turkey, 16 July, 2016 Reuters In pictures: Turkey coup attempt Turkish soldiers block Istanbul's Bosphorus Brigde Getty In pictures: Turkey coup attempt A Turkish military stands guard near the Taksim Square in Istanbul Reuters In pictures: Turkey coup attempt Pierre Crom/Twitter In pictures: Turkey coup attempt Turkish soldiers secure the area as supporters of Recep Tayyip Erdogan protest in Istanbul's Taksim square AP In pictures: Turkey coup attempt People demonstrate in front of the Republic Monument at the Taksim Square in Istanbul Murad Sezer/Reuters In pictures: Turkey coup attempt Turkish soldiers detain police officers during a security shutdown of the Bosphorus Bridge Reuters In pictures: Turkey coup attempt Turkish Army armoured personnel carriers in the main streets of Istanbul Getty In pictures: Turkey coup attempt Chaos reigned in Istanbul as tanks drove through the streets EPA/TOLGA BOZOGLU In pictures: Turkey coup attempt Turkish President Tayyip Erdogan speaks to media in the resort town of Marmaris Reuters In pictures: Turkey coup attempt Supporters of President Erdogan celebrate in Ankara following the suppression of the attempted coup Reuters

In another demonstration of unity after the coup, which was staged by a faction within the armed forces, the head of Turkey's air force issued a rare statement stressing "absolute obedience" to the chief of the military General Staff. Some members of the air force were involved in the coup.

The chief of the military General Staff, Hulusi Akar, who was held hostage by the plotters on the night of July 15, condemned the plotters on Sunday as "cowards in uniform" who had greatly harmed the nation and the army.

Erdogan, who narrowly escaped capture and possible death during the attempted coup, has declared a state of emergency, allowing him to sign laws without prior parliamentary approval in a drive to root out supporters of the coup.

His critics fear he is using the abortive coup to wage an indiscriminate crackdown on dissent. Turkish authorities have suspended, detained or placed under investigation more than 60,000 soldiers, police, judges, teachers, civil servants and others in the past week.

Turkey failed coup attempt: How it unfolded

Prime Minister Binali Yildirim said on Saturday authorities had taken around 13,000 people into custody over the coup attempt, including 8,831 soldiers. He pledged they would have a fair trial.

For now, the crackdown appears to be broadly popular.

"The state of emergency is a good thing and it's good that many people have been arrested and that the length of detentions has been extended," said demonstrator Harun Kalyancu, 34, a furniture designer and supporter of the ruling party. "If people lost their jobs they must be guilty."

Zuhal Tolbert, 56, who is retired, said the government should be more inclusive.

"The government has to think about the mistakes they have made they have to think about the other half of the population. (who did not vote for them)," she said. "We all have to come together."