A Turkish court has placed 12 people under arrest on charges of shouting curses against President Recep Tayyip Erdogan ahead of an opposition election rally last week, state media said on Wednesday.

The 12 have been charged with "insulting a state leader" over the incident, which took place before a mass rally in the Aegean city of Izmir by opposition candidate Muharrem Ince who stood against Erdogan in Sunday's presidential elections.

Despite an energetic campaign by Ince, Erdogan was re-elected president outright in the first round.

READ MORE Turkey's Erdogan clinches second term with majority vote

The state-run Anadolu news agency said images had been shared on social media of the incident, which took place at a restaurant in Izmir where alcohol was on offer. They have now been remanded in custody ahead of trial.

Footage posted widely on pro-government websites showed people sitting at an outdoor restaurant chanting Erdogan's name ironically, with the alleged curse words bleeped out.

The Izmir rally last Thursday was one of a sequence of giant meetings held by Ince at the end of the campaign in Turkey's main cities.

The city is seen as a stronghold of Ince's Republican People's Party (CHP) and in Izmir province Ince polled 54 per cent of the votes in the elections.

Thousands of people have been prosecuted on charges of insulting Erdogan since he became head of state in 2014, sparking alarm among rights activists.