Freelance journalist Kosuke Tsuneoka, detained over suspected links to ISIL, was handed over to Japanese authorities.

Authorities in Iraq’s autonomous Kurdish region on Monday handed over a Japanese national detained last month on suspicion of ties to ISIL.

Media reports say Kosuke Tsuneoka, 47, is a freelance journalist who was covering the battle to take the city of Mosul from the armed group.

“A Japanese national, Mr Kosuke Tsuneoka – also known by the nom de guerre Shamil K Tsuneoka – was detained … for links to the Islamic State,” the Kurdistan Regional Security Council said in a statement.

“An investigation by our Counter-Terrorism Department found he was in contact with ISIL members through his smartphone.”

Tsuneoka was taken into custody on October 27 by Kurdish forces near Mount Zardak, a strategic hill east of Mosul, the council said.

READ MORE: Japanese journalist missing in Syria appears in video

After his release, Tsuneoka took to Twitter to explain what happened.

He said he had been arrested because he was carrying a key chain with an ISIL logo that he obtained on an earlier reporting trip.

“But this became a problem at a security check for a presidential press conference. I was suspected as an IS member and arrested and interrogated. I had explained this to the authorities, and I do hope they believe my innocence,” Tsuneoka said.

He denied a media report that said he served as a translator for ISIL fighters and received a medal.

“That’s terrible. I don’t understand Arabic at all,” he tweeted.

Mosul is ISIL’s last major stronghold in Iraq. A coalition of Iraqi forces, including the Kurdish Peshmerga, launched a huge multi-pronged offensive to retake the city on October 17.

The KRSC said Tsuneoka left the country on Monday via the main airport in Erbil, the capital of Iraq’s Kurdish region.