Cyber terrorist. (shutterstock)

The headquarters, Western intelligence has learned, were set up about two years ago.

Hamas has been using a secret headquarters in Istanbul for cyberwarfare and counter-intelligence purposes, The Times reported on Thursday.

The headquarters, Western intelligence has learned, were set up about two years ago and are separate from the Islamic terror group’s official offices in the same city, which deal mainly with coordination and funding, according to the British report.

The Turkish government was unaware of the secret headquarters, directed by senior Hamas official Samakh Saraj, who reports directly to the Yahya Sinwar, the Gaza-based terror group’s leader, the report claims.

Turkey granted citizenship in August to members of a Hamas terrorist cell so that they could use the country as a base to launch attacks not just against Israel, but targets around the world as well, The Telegraph in London reported at the time.

Both the US and UK have listed Hamas as a terrorist group, while Turkey, despite being a NATO member, calls the group a legitimate political movement and provides it with assistance and shelter.

The Turkish government refused to answer the allegations in the article in August, with a spokesman saying they were “baseless claims against Turkey by a foreign government.”

Regarding the latest report about the secret headquarters in Istanbul, there was no comment from Turkey to date.

Turkey’s has become increasingly hostile towards Israel under the leadership of President Recep Tayyip Erdogan, who has close ties to radical Islamic organizations.