Two Turkish journalists have been sentenced to nine years in prison over a report covering the funeral of a Turkish intelligence officer reportedly killed in Libya, according to local media.

News director Baris Terkoglu and reporter Hulya Kilinc were detained earlier this week after a video was published on the OdaTV website claiming to show the officer's burial, the Hurriyet Daily News reported on Thursday.

More:

Last year Ankara and Tripoli signed a military cooperation deal, and Turkey has since sent troops and allied Syrian fighters to Libya.

According to state news agency Anadolu, an Istanbul court formally arrested the two journalists on suspicion of disclosing the identity of an intelligence agency official.

The Turkish news website published the officer's first name and the initial of his last name, the Committee to Protect Journalists said. It also reported his burial took place in Turkey's western province of Manisa.

Responding to criticism, OdaTV told local media the officer's name had already been revealed by an opposition lawmaker.

200225093205268

In an interview with CNN Turk, Turkish Interior Minister Suleyman Soylu condemned the news report, saying, "There is such a thing as state secrets, national security secrets."

Terkoglu served a 19-month prison sentence between 2011 and 2012 after being accused of taking part in a plot to topple the government.

Last month, Turkey's President Recep Tayyip Erdogan said two Turkish troops were killed in Libya, where Ankara backs the United Nations-recognised government in the North African state's conflict.

Turkey provides military support to the Government of National Accord (GNA), which is based in the capital, Tripoli. Since April, the city has been under an assault by forces loyal to renegade military commander Khalifa Haftar, who is aligned with a rival administration based in the country's east.

Ankara says its military personnel are there to support the GNA, but denies they are engaged in active fighting.

Turkey ranked 157th out of 180 countries in the 2019 World Press Freedom Index compiled by Reporters Without Borders.

The Turkish Union of Journalists said 135 members of news outlets are currently jailed in Turkey.