The assailant, a 19-year-old former student, used a shotgun in the attack in the Siverek district. The wounded were taken to hospital, with five later transferred to facilities in Sanliurfa city centre for further treatment, Sildak said.
He later told broadcaster NTV that the attacker opened fire indiscriminately, starting in the school yard before entering the building. The shooter killed himself as police attempted to apprehend him, Sildak added.
Sildak said the attacker had no prior criminal record and that the school had previously been classified as safe by police.
The Interior Ministry said 10 of the wounded were students, four were teachers, one was a police officer and another a school canteen employee.
The condition of the wounded was not immediately known.
Video footage showed students fleeing the school as ambulances and police vehicles arrived at the scene.
(Reporting by Huseyin Hayatsever; Editing by Ece Toksabay and Sharon Singleton)

epa11677411 Policemen secure the area during a terror attack at (TUSAS) Turkish Aerospace and Aviation Center's headquearter in Ankara, Turkey 23 Ocober 2024. Turkey's interior ministry reports that several people are "dead and injured" following an explosion at the headquarters of a Turkish aviation firm close to Ankara. EPA/NECATI SAVAS