The Ever Given megaship, which blocked the Suez Canal for six days in March, has finally left the waterway after Egypt and the vessel's Japanese owners signed a compensation deal.

Iran PressAfrica: Egyptian authorities seized the Ever Given after the supercontainer was released from the Suez Canal where it had been held in an effort to secure more than $900m in compensation, according to Bloomberg. 

The ship has since been moored in the Great Bitter Lake, halfway along the Suez Canal, where the vessel's 25 Indian crew members remained on board.

But following months of negotiations and court proceedings, the Ismailia Economic Court ruled that the seized ship and its crew were to be released following a request from the Suez Canal Authority (SCA). 

SCA chief Osama Rabie signed the deal in a ceremony attended by ambassadors and a representative from the Japanese firm Shoei Kisen Kaisha.

"I announce to the world that we have reached a deal," Rabie said at a ceremony televised live on Egypt's state television on Wednesday. 

"We were facing a tough test with the world watching." 

The vessel, which is longer than four football pitches, left the Suez Canal on Wednesday at 11.30am local time.  

Last month, the SCA signed a non-disclosure agreement with the Japanese company that owns the Ever given before reaching a final deal. 

The nearly 200,000-tonne container vessel blocked the Suez Canal, which links Asia to Europe and carries 10 percent of global maritime trade and provides Egypt with vital revenues. 

According to the SCA, Egypt, which earns more than $5bn a year from the canal, lost between $12m and $15m in revenues each day it was closed. 

Egyptian President Abdel Fattah al-Sisi swiftly pledged investment to avoid any repetition of the crisis. In May, he approved a two-year project to widen and deepen the southern part of the waterway where the ship ran aground.

Sisi oversaw the $8bn expansion of a northern section of the canal amid much fanfare in 2014-15.