The plan includes cooperation in the fields of oil, petrochemicals, defence, agriculture, tourism, and culture and was signed by foreign ministers Hossein Amirabdollahian and Venezuela's Carlos Faria.
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,” he added.
“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 further said.
Maduro said through an interpreter that a weekly flight from Caracas to Tehran would begin on 18 July.
Maduro, who arrived in Tehran on Friday, is on a two-day visit and heads a high-ranking political and economic delegation. Earlier, he visited Turkey and Algeria.
Maduro and Raisi later attended a ceremony marking the delivery to Venezuela of the second of four Aframax-sized oil tankers, with a capacity of 800,000 barrels each, which it has ordered from Iran's SADRA company, Reuters said quoting the Iranian state news agency IRNA.
SADRA has been under US sanctions for more than a decade over its links to Iran's elite Revolutionary Guards.
Iran and Venezuela have expanded cooperation since 2020, particularly in energy projects and oil swaps.
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.
That agreement was sealed after recent negotiations attended by Iranian Oil Minister Javad Owji, who was in Venezuela early last month.