MUGLA - Almost 50 suspects went on trial on Monday accused of plotting to assassinate Turkish President Recep Tayyip Erdogan at a luxury Aegean hotel on the night of the botched July 15 coup.

Forty-four suspects, mainly soldiers, are under arrest, while three others still on the run are being tried in absentia at the court in the southern city of Mugla.

The suspects, several smartly dressed in suits and ties, were led into the court by security forces in front of television cameras, AFP correspondents said.

Onlookers heckled the accused as they stepped out of the buses that took them from prison, shouting "we want the death penalty!" and "Allahu Akbar" ("God is Greatest"). The trial was taking place under the highest security with snipers posted on rooftops and helicopters circling overhead.

Erdogan, who was holidaying at a hotel in the upmarket Aegean resort of Marmaris with his family on the night of the coup, has said the plot left him 15 minutes from death. Prosecutors have sought multiple life sentences for each of the 47 suspects, who include an alleged "hit squad" of 37 soldiers.

Many were detained hiding in the mountains above Marmaris, even in caves, in the days after the coup bid that left 248 dead not including the plotters.

Turkish officials say the plot to kill Erdogan was a key part of the plan to depose the elected government they allege was masterminded by the US-based Muslim cleric Fethullah Gulen and his so-called Fethullah Terror Organisation (FETO). The plan was to "neutralise the president," Erdogan's lawyer Huseyin Aydin told AFP outside the court. "If our president was neutralised as planned, the course of the coup would have been different. We would have been faced with a different Turkey," he said. Ankara has repeatedly demanded that the United States extradite Gulen, who lives in a secluded compound in the US state of Pennsylvania.

The preacher, who is on trial in several cases in Turkey, is one of the three suspects still at large in the assassination plot trial. Onlookers waving Turkish flags chanted slogans against the accused and Gulen, including "Execution!" and "Game Over, FETO".

After the coup, there have been calls to reimpose the death penalty in Turkey, which was abolished in 2004. Its reinstatement would spell the end of Turkey's embattled bid to join the European Union.

Despite this, Erdogan has repeatedly told crowds at rallies he would approve legislation reimposing the death penalty if it was approved by parliament.

The trial was being held in a conference centre rather than a standard courtroom to accommodate the high number of suspects.

Inside the tense court, suspects were placed at the centre surrounded by dozens of soldiers with batons. The initial phase should last until March 15.

One of the most senior soldiers on trial, former brigadier general Gokhan Sahin Sonmezates, denied any link to Gulen, describing his organisation as a "perversion". Sonmezates claimed he believed he was part of an action by the Turkish army. "My motivation was to protect my country," he said.

Turkey has hit out at claims that the plotters' failure to eliminate Erdogan raises questions about the seriousness of the plot, insisting that the president was targeted by a potentially lethal conspiracy.

Accompanied by close family members including his son-in-law, Energy Minister Berat Albayrak, Erdogan had managed to flee Marmaris and fly to Istanbul where he oversaw the suppression of the coup. "If I had stayed 10 or 15 additional minutes there, I would have been killed or I would have been taken," Erdogan told CNN in an interview on July 18. Two Turkish policemen who were helping to guard Erdogan at the hotel were killed, according to the indictment. Some 43,000 people have been arrested following the coup attempt in a massive crackdown on followers of Gulen that has raised international concerns. Gulen vehemently denies being behind the plot. The Mugla trial is one of many now getting under way across the country to judge the coup suspects, the biggest legal process in the country's modern history.