Egypt will release the container ship that blocked the Suez Canal in March, after it agreed a compensation deal with the vessel's owners and insurers.
The two sides said the Ever Given would be allowed on Wednesday to leave the Great Bitter Lake, the canal's midway point, where it has been impounded.
The deal's terms were not revealed, but Egypt had demanded $550m (£397m).
The 400m-long (1,312ft) Ever Given became wedged across the canal after running aground amid high winds.
It was freed six days later following a salvage operation that involved a flotilla of tug boats and dredging vessels, and during which one person was killed.
Global trade was disrupted as hundreds of ships had to wait to pass through the 193km (120-mile) waterway, which connects the Mediterranean Sea to the Red Sea and provides the shortest sea link between Asia and Europe.
UK Club, which insured the Ever Given's owner Shoei Kisen for third-party liabilities, announced on Sunday that a "formal solution" had been agreed with the Suez Canal Authority (SCA) to settle their dispute over compensation.
"Preparations for the release of the vessel will be made and an event marking the agreement will be held at the authority's headquarters in Ismailia in due course," it added.
The SCA said the event would be held on Wednesday, and that participants would be able to watch the ship leaving the canal.
Neither side disclosed the amount of compensation, but SCA chairman Osama Rabie said it would receive a tug boat as part of the deal.
The SCA initially asked for $916m, including $300m for a salvage bonus and $300m for loss of reputation. But UK Club rejected the claim, describing it as "extraordinarily large" and "largely unsupported".
The SCA later lowed its demand to $550m, but the owners and insurers reportedly offered to pay $150m.
Mr Rabie said in May that the Ever Given had struggled to steer and ran aground despite the efforts of two escort tugs because it was moving at a "very high" speed and its rudder's size "was not appropriate".
UK Club said that while the Ever Given's owners and insurers "fully acknowledge that the SCA is entitled to compensation for their legitimate claims arising out of this incident", they were concerned by the allegations.
"It is important to clarify that whilst the master is ultimately responsible for the vessel, navigation in the canal transit within a convoy is controlled by the Suez Canal pilots and SCA vessel traffic management services. Such controls include the speed of the transit and the availability of escort tugs."
The value of the goods inside the Ever Given's 18,000 containers has been estimated at $775m. They include products for large multinational companies like Chinese PC manufacturer Lenovo and Swedish furniture giant Ikea, as well as those for smaller businesses like UK-based clothing company Snuggy and bicycle maker Pearson 1860.