Islamic State militants (Rear) stand next to an IS flag atop a hill in the Syrian town of Ain al-Arab, known as Kobane by the Kurds, as seen from the Turkish-Syrian border in the southeastern town of Suruc, Sanliurfa province, on October 6, 2014

Islamic State extremists staged mock executions of Western captives held in a Syrian compound intended to be the jihadist answer to Guantanamo, former hostage Javier Espinosa revealed Sunday.

Writing in his El Mundo newspaper, the Spanish journalist who was kidnapped on September 16, 2013 and freed on March 29, 2014, also detailed for the first time the execution of Russian hostage Sergei Gorbunov, who went missing in October, 2013.

Espinosa said IS grouped as many as 23 hostages from 11 Western countries in a villa north of Aleppo, where his captors wanted to replicate the US prison in Guantanamo, Cuba, used to detain enemy jihadist combattants.

Quoting information he'd been told by American journalist James Foley, who was decapitated by IS in 2014, Espinosa wrote: "'They had this project for a long time. The (head guard) told us at the beginning they wanted to intern Westerners in a high-security prison with cameras and lots of guards'."

"'They told us that we would be here for a very long time, because we were the first ones they captured'," Foley confided to Espinosa.

He said the group of 22 European, American and Latin-American journalists and humanitarian workers held in the compound were submitted to repeated mock executions by a trio of particularly brutal guards that prisoners nicknamed "The Beatles."

Other times, hostages were forced to view images from the execution of Russian engineer Gorbunov, who was assassinated by what captors told the prisoners was an exploding bullet fired to his head.

"You may wind up like him," Espinosa recalls a guard taunting him. "Or maybe we will make you unearth him and dig another grave so you can sleep with him."

Espinosa says he waited nearly a year after being freed to reveal details of his detention because IS captors had warned they would execute remaining hostages if he spoke about his ordeal "before everything has been finished."

Espinosa wrote that time has now come, with 15 of his group of 23 prisoners having been released, six executed, and American humanitarian worker Kayla Mueller killed in a US bombing of IS positions last month.

The fate of another fellow detainee, British photographer John Cantlie, is unknown after a recently released IS video showed him still alive.