The megatanker retained by Egypt since it blocked the Suez Canal in March will be released Wednesday, after the authority that manages the vital waterway said a deal was reached with its Japanese owners.