erdogan
President Recep Tayyip Erdogan Reuters/Ints Kalnins

ISTANBUL (Reuters) - Turkish police have arrested a 16-year-old high school student in the city of Konya on charges of insulting President Tayyip Erdogan, local media reported on Thursday.

The teenager's lawyers have appealed against the prosecution, which came after he read out a statement during a ceremony to commemorate the killing of a Turkish soldier by Islamists in the 1920s.

In a video broadcast by Dogan News Agency, the teenager read out a statement defending secularism and the principles of Mustafa Kemal Ataturk, the founder of the modern Turkish republic.

He slammed the ruling AK Party government and Erdogan personally over corruption allegations, as a crowd surrounding him chanted "everywhere is bribery, everywhere is corruption".

Erdogan portrayed a high-reaching corruption scandal that was initiated a year ago as a coup attempt orchestrated by his former ally U.S.-based cleric Fethullah Gulen to undermine his rule.

The scandal posed one of the biggest challenges to Erdogan's 11-year-rule as prime minister, leading three members of his cabinet to quit and drawing international criticism for his response, tightening Internet controls and reassigning police, judges and prosecutors.

The teenager, who is being held in detention, has pleaded not guilty, Dogan News Agency said.

The boy's arrest sparked fierce criticism of Erdogan by opponents.

Atilla Kart, a lawmaker with the main opposition party CHP, said on Twitter that "an environment of fear, oppression and threat" was being created by the presidency.

Turkey's penal code forbids insulting the president. Prime Minister Ahmet Davutoglu was critical of the teenager and said everyone should respect the post of the presidency.