For a nation that provides safe passage for so many ships through its waters, Egypt is reserving rather special treatment for the Ever Given.

The 400-meter-long container ship will be seen off on Wednesday in a ceremony attended by dignitaries, diplomats and company officials from around the world. In fact, the last time the Suez Canal Authority, which is hosting the event, promised this much fanfare was in 2015, when an $8 billion expansion project was completed within a year.

This time though, the event will be as much about closure as celebration. Because it was the Ever Given, the giant Japanese-owned vessel carrying some $1 billion worth of cargo, that last March lost control as it traveled north through the canal, crashing into the banks and blocking the waterway like a giant cork. It was an incident that roiled global markets and transfixed the world for nearly a week.

The ceremony will be marked by the signing of a settlement deal between the canal authority and vessel owners Shoei Kisen Kaisha Ltd., capping what turned into a public relations crisis for the overseers of the waterway and, by extension, Egypt itself.

Freeing the ship just six days after the incident last March may have won the authority some kudos, as well as providing relief for the estimated $10 billion worth of marine traffic that built up each day as a result. What happened next, in terms of determining blame and compensation, carried an equally high premium for Egypt, both domestically and abroad.

“We have preserved our full rights regarding the costs of the rescue operation and the damages caused to the navigation course,” Osama Rabie, the authority chief, said on Egyptian TV on June 23. “We also preserved the close relationship with the largest clients of the authority and the economic and political relations with Japan.”

With the eyes of the world upon them, canal employees, along with outside help, worked around the clock to free the Ever Given. Often risking their lives, workers ensured that there was minimal damage to the ship, its 17,600 containers and the canal itself. In the end, the heavens offered a helping hand when unusually high tides allowed teams to refloat the vessel.

Just as tricky as freeing the ship, though, was the process of disentangling the arguments about blame and compensation.

Egypt had dodged a bullet by freeing the Ever Given so quickly and clearing the backlog of over 400 ships delayed by the incident. It now had to walk the line between recouping losses, both physical and perceived, and ensuring that it didn’t appear to give up its rights before a global audience or, at the same time, alienate its clients.

For the ship’s owners and insurers, it boiled down to a more basic calculus: What could or should they pay?

As the issue moved to the Egyptian courts, which ordered the Ever Given seized pending a resolution, the stakes grew on both sides. Egypt wanted more than $900 million. The counteroffer was around $150 million.

Neither side has commented on the size of the settlement or provided other details. Rabie, in another television interview, said it was near the $550 million mark—the new figure that had been presented in revised court documents. He declined to be more specific, however, citing confidentiality agreements relating to the money issue.

But there’s more to the issue than money for Egypt.

While earnings from the Suez Canal are a key source of foreign revenue for the country, credibility is priceless. It’s something President Abdel-Fattah El-Sisi has been working to shore up since his election in 2013.

Under his leadership, the canal-expansion project has been one of several major infrastructure efforts launched to the tune of hundreds of billions of Egyptian pounds. After the Ever Given incident, plans for another expansion were proposed.

The desire to project a new, modern Egypt, required the same of its officials and their ability to handle crisis. That was made clear by El-Sisi in one his conversations with Rabie during the effort to free the Ever Given.

The president says he asked the canal chief what the most challenging aspect of refloating the vessel might be. Rabie said it would be the offloading of the containers, a process some said may take up to three months.

“Let’s be ready,” the president says he told Rabie. “Whatever it costs we have to be ready in a crisis like this.”