The megatanker retained by Egypt since it blocked the Suez Canal in March will be released this Wednesday, after the authority that manages the vital waterway said a deal was reached with its Japanese owners.
The MV Ever Given - a behemoth with a deadweight tonnage of 199,000 - got stuck diagonally across the canal during a sandstorm on 23 March, blocking the trade artery for six days before salvage teams could dislodge it.
Egypt retained the vessel - seeking compensation from Japanese firm Shoei Kisen Kaisha for lost canal revenues and the cost of salvaging it as well as for damage to the shipping lane that links Asia and Europe.
The Suez Canal Authority said in a statement that a ceremony would be held on Wednesday to mark the signing of an agreement with the owners and "the departure of the ship".
The statement did not disclose the amount of compensation.
Egypt lost between €10 million and €12.5 million in revenues for each day the waterway was closed, according to the Suez Canal Authority.
The grounding of the ship and the intensive salvage efforts needed to refloat it also resulted in significant damage to the canal.
A member of the London-based Stann Marine law firm, which represents the owners and insurers of the Ever Given, confirmed in a statement that preparations were under way for its release.
"We are pleased to announce that... good progress has been made and a formal solution agreed" between the two sides, Faz Peermohamed said in the statement.
Last week, Suez Canal Authority chief Osama Rabie said Egypt had signed a non-disclosure agreement with the owners of the Ever Given as it finalised the compensation agreement.
Initially, Egypt had sought hundreds of millions of dollars in compensation but it later slashed its initial claim of $900 million to $550 million (€463 million).
The Taiwanese-operated and Panama-flagged ship was moved to unobstructive anchorage in the Suez Canal after it was freed on 29 March, and tailbacks totalling 420 vessels at the northern and southern entrances to the canal were cleared in early April.
Egypt's President Abdel Fattah al-Sisi has ruled out any widening of the southern stretch of the canal where the boat became diagonally stuck.