Iran and Venezuela, oil producers grappling with crippling U.S. sanctions, signed a 20-year cooperation plan in Tehran on Saturday, with the Islamic Republic's supreme leader saying the allies would continue to resist pressure from Washington.

The signing ceremony, carried by Iranian state TV, was overseen by Iranian President Ebrahim Raisi and his Venezuelan counterpart Nicolas Maduro and took place at the Saadabad Palace in north Tehran.

The plan includes cooperation in the fields of oil, petrochemicals, defence, agriculture, tourism, and culture. It also includes repair of Venezuelan refineries and the export of technical and engineering services.

"Venezuela has shown exemplary resistance against sanctions and threats from enemies and Imperialists," Iran's Raisi said. "The 20-year cooperation document is testimony to the will of the two countries to develop ties."

"Sanctions and threats against the Iranian nation over the past 40 plus years have been numerous, but the Iranian nation has turned these sanctions into an opportunity for the country's progress," he said.

Maduro said through an interpreter that a weekly flight from Caracas to Tehran would begin on July 18.

In a meeting with Maduro, Supreme Leader Ayatollah Ali Khamenei vowed Iran would continue to back Venezuela in the face of U.S. pressures, according to state media.

"The successful experience of the two countries showed that resistance is the only way to deal with these pressures," Khamenei said. "The two countries have such close ties with no other country, and Iran has shown that it takes risks in times of danger and holds its friends' hands."

Maduro said: "You came to our aid when the situation in Venezuela was very difficult and no country was helping us."

Defying U.S. pressures, Iran has sent several cargos of fuel to Venezuela and helped in refinery repairs. Last month, Venezuela began importing Iranian heavy crude, widening a swap agreement signed last year to exchange Iranian condensate for Venezuelan heavy crude.

Maduro arrived in Tehran on Friday with a high-ranking political and economic delegation after visiting Turkey and Algeria.

During the visit, Iran delivered to Venezuela the second of four Aframax-sized oil tankers, with a capacity of 800,000 barrels, ordered from the Iranian company SADRA, state media said. SADRA has been under U.S. sanctions for more than a decade over its links to Iran's elite Revolutionary Guards.

In May, Iran's state-owned National Iranian Oil Engineering and Construction Co signed a contract worth about 110 million euros to repair Venezuela's smaller 146,000 barrel-per-day refinery.

(Reporting by Dubai Newsroom; Editing by Jason Neely, Angus MacSwan and Diane Craft)