A gunman in Turkey has shot and killed four people at a university in the northwest of the country and injured three more.

The man, a researcher at the establishment, then handed himself over to police.

Those killed were all academics and included the assistant dean and a lecturer at Osmangazi University in Eskisehir some 250 kilometres west of Ankara.

The university rector said the gunman targetted people he believed were supporters of a Muslim cleric accused by the government of being behind a failed coup in 2016.

One professor at the university told Turkish media some members of staff had "repeatedly filed complaints" about the gunman.