German Foreign Minister Frank-Walter Steinmeier said that he had told Iranian leader he was welcome to visit Germany the next time he comes to Europe.
Speaking after meeting with Rouhani in Tehran on Wednesday, Steinmeier said he had urged the Iranian leader "to keep Germany in mind as a destination on his next trip to Europe."
Rouhani paid a five day visit to Europe last January in where he met with Italian and French leaders to improve economic and political relations after the lifting of international sanctions on Iran.
For decades before sanctions were imposed, Germany was Iran's biggest trading partner. The gap in Iranian imports from Germany and other Western countries has largely been filled by Chinese, Korean and Middle Eastern competitors.
Germany's Chambers of Commerce and Industry (DIHK) said it expected exports to Iran to double to 5 billion euros ($5.5 billion) in the coming years and reach twice that figure in the long term.
This could compensate, at least partially, for the waning demand of German goods from China, Russia and other emerging markets.
After meeting with his Iranian counterpart Javad Zarif, Steinmeier on Tuesday praised the nuclear deal which was signed last year saying that both Germany and Iran seek to boost bilateral relations.
He emphasised that the nuclear deal could help foster a political solution to the Middle East where the Syrian civil war displaced millions and killed over 250,000 people.
"I am confident the [nuclear deal] made the world and region safer, and for the years to come narrowed prospects of nuclearisation of the region," he said during his second Iran visit in the last three months.