Article content continued

Opposition leaders had previously speculated openly that he had done a deal with ISIS to release the hostages before the election, to boost his standing among voters compared with rival non-Islamist candidates.

In fact that never happened, but the same suspicions were aroused by the release of the 49 — 46 Turks and three Iraqis — without a shot being fired.

“There are things we cannot talk about,” Mr. Erdogan said. “To run the state is not like running a grocery store. We have to protect sensitive issues. If you don’t, there would be a price to pay.”

We apologize, but this video has failed to load.

tap here to see other videos from our team. Try refreshing your browser, or

However, reports were leaked that the Turkish intelligence service, MIT, had played a major role in trying to free the hostages.

A more likely explanation for the release emerged on social media. A website thought to reflect ISIS thinking said that the group had won guarantees that Turkey would not join air strikes or other military intervention.

Another report said the hostages had been exchanged for three top-level prisoners, something given credence by Mr. Erdogan’s refusal to deny it. “Whether there was or wasn’t a swap, 49 personnel were returned to Turkey,” Mr. Erdogan said. “I would not exchange that for anything.”

Serhat Guvenc, a professor of international relations at Kadir Has University in Istanbul, warned against reading too much into that particular hint.

“There’s a thick fog around this issue,” he said.

The release of the hostages, who included wives and children who had been based at the consulate in Mosul, was welcomed by all sides but some MPs from the Nationalist opposition party CHP expressed doubt about Mr. Erdogan’s story.

“Who are you kidding? This is theatre,” said one, Muharrem Ince. “This government has failed the Turkish nation. Our borders are so porous that it is not clear who is coming or going.”

The hostages themselves were unharmed and said they had been better treated than western hostages because they were Muslim. But they said they had been forced to watch ISIS beheading videos. “They liked to demoralize hostages,” said the consul general, Ozturk Yilmaz, who had a gun put to his head.

With files from The Associated Press