ISTANBUL (Reuters) - Turkish President Tayyip Erdogan said on Sunday he did not respect or accept a constitutional court ruling that the detention of two journalists from a leading opposition newspaper had violated their rights.

Can Dundar, editor-in-chief of Cumhuriyet, and Ankara bureau chief Erdem Gul were released pending trial on Friday after the constitutional court ruling.

Their arrest last November, after Cumhuriyet published video footage purporting to show the state intelligence agency helping send weapons to Syria, drew international condemnation and concern about media freedom in Turkey.

"I will remain silent to the decision the court has given. But I don't need to accept it, I want to make that clear. I don't obey or respect the decision," Erdogan told reporters in Istanbul before leaving on an official visit to West Africa.

"This has nothing to do with press freedom. This is a case of spying," he said.

The two were charged with intentionally aiding an armed terrorist organization and publishing material in violation of state security. Cumhuriyet published photos, videos and a report last May that it said showed intelligence officials transporting arms to Syria in trucks in 2014.

Despite their release, the two journalists are facing possible life sentences at a trial due to start on March 25 and are banned from leaving the country.

Erdogan, who has cast the newspaper's coverage as part of an attempt to undermine Turkey's global standing, has said he will not forgive such reporting.

(Writing by Nick Tattersall; Editing by Janet Lawrence)