The Cypriot captain of the “Prudent Warrior” ship was repatriated on Wednesday, after months of being held in Iran in a diplomatic dispute between Athens and Tehran.

According to a social media post from Foreign Minister Ioannis Kasoulides, he contacted the captain who was returned safely to Cyprus.

In September, Iran agreed to release the crews of two Greek tankers it seized in May in the Gulf, in response to the confiscation of oil by the United States from an Iranian-flagged tanker in Greece, the Greek union of commercial ships’ seafarers said.

The case had strained relations between Athens and Tehran as tensions grow between Iran and the United States.

The tankers’ crew was replaced, allowing their return to their countries of origin, the union said in a statement on its website.

It was not clear whether the two Greek tankers, the MT Prudent Warrior and Delta Poseidon, would be released, it added.

Back in April, tensions rose between the two countries prompting Tehran’s reaction when the Iranian-flagged tanker Lana, formerly Pegas, was seized by Greece and was held for months. The United States had confiscated part of its oil cargo due to sanctions.

The removal of oil from the Lana prompted Iranian forces in May to seize two Greek tankers in the Middle East Gulf and sail them back to Iran after Tehran warned of “punitive action” against Athens.

Lana, which had engine problems, was officially released in July. Anchored off Piraeus since then, it has retrieved the oil cargo that the United States had confiscated and is expected to sail back to Iran.