Turkish President Recep Tayyip Erdogan has threatened an opposition daily which published footage allegedly showing trucks belonging to the state intelligence service carrying weapons to rebels in Syria, vowing it will pay a "heavy price".

"The slander against the National Intelligence Organization and the illegitimate operation (against MIT trucks) is an espionage activity at one point," Erdogan told state-run TRT television late Sunday. "This newspaper was also involved in this espionage activity."

"The person who made the story will pay a heavy price. I will not let him get away with it," said the president, who has threatened other media outlets in the run-up to this week's tense parliamentary election.

The footage published on the opposition Cumhuriyet daily's website on Friday shows inspectors searching a metallic container watched by security officers, a prosecutor and sniffer dogs.

The daily claimed the trucks were carrying mortar shells, ammunition for light and heavy weapons as well as hundreds of grenade launchers hidden under boxes of antibiotics marked as "fragile".

Turkish prosecutors swiftly opened an investigation into the daily on charges of "obtaining information on state security", "political and military espionage" and "propaganda for a terrorist organisation".

Cumhuriyet editor-in-chief Can Dundar hit back the Erodgan, tweeting, "We are not civil servants but journalists. Our duty is not to hide the state's dirty secrets but to call it to account in the name of people."

"The person who committed this crime will pay a heavy price," he added, referring to the president. "We will not let him get away with it,"

Turkey has vehemently denied aiding jihadists in Syria including the Islamic State (IS) group, claiming the intercepted aid was bound for the Turkmen minority in Syria.

In an interview with Agence France Presse, Prime Minister Ahmet Davutoglu claimed the release of the images was an election ploy, and denounced what he called an "illegal action" against Turkey's interests.

He said Turkey had helped the rebel Free Syrian Army without specifying if it has supplied them militarily.

Tensions are mounting in the run-up to the June 7 parliamentary elections, with the Justice and Development Party (AKP) seeking to prolong its 13-year hold on power.

The ruling party denies rebels fighting in Syria and accused dozens of prosecutors, soldiers and security officers involved in searching the trucks last year of attempting to bring it down through such claims.