The suspected hostage taker
The suspected hostage takerSocial media

After about nine hours, Turkish police on Thursday evening freed a group of hostages taken by a gunman at a plant near Istanbul owned by US consumer goods giant Procter & Gamble, AFP reported.

“When he went out for a bathroom break, our security forces carried out an operation without harming the hostages,” local governor Seddar Yavuz was quoted having told reporters.

He added that the assailant had been detained.

"The man's aim was to stop Israel's massacre in Gaza and to open the Rafah gate in Egypt" for the delivery of humanitarian aid for trapped civilians, Yavuz said, as quoted by the AFP news agency.

Photos and videos of the assailant shared online by one of the hostages and verified by AFP showed a man -- his face hidden by a Palestinian Arab scarf -- holding a gun with what appeared to be a suicide vest strapped to his chest.

He was standing next to a drawing of a Palestine Liberation Organization (PLO) flag and the words "the door will be opened for Gaza" painted on the wall in red.

Yavuz said the man was carrying two guns and appeared to have explosives strapped to his chest, adding that "we had to evaluate every possibility".