Ukrainian officials are working to release a detained vessel carrying Ukrainian wheat purchased by Egypt's government, Ukraine's Mideast envoy told reporters on Monday.

The vessel, Emmakris III, was detained last month at the request of Ukraine's prosecutor general to investigate its alleged Russian owner, court documents seen by Reuters showed.

"We are working in coordination with all the responsible authorities in Ukraine and in Egypt, to see that this ship is allowed to set sail as soon as possible," Ukraine's special envoy to the Middle East Maksym Subkh said.

The cargo of around 60,000 tonnes of Ukrainian wheat was purchased by Egypt's state grains buyer, the General Authority for Supply Commodities (GASC), in a December tender for shipment in February but has been stuck at the Port of Chornomorsk since Russia's invasion of Ukraine on Feb. 24.

The vessel was expected to sail last month after the United Nations and Turkey brokered a deal to restart Black Sea grain and fertiliser exports blocked since the start of the crisis.

The detention was due to allegations that the vessel is owned by a Russian company involved in "financing action aimed at changing the boundaries of the territory or state border of Ukraine," the court order said.

The cargo was supplied to GASC by trading company Olam, while the freight was supplied by Dubai-based trading company GTCS, which has denied owning the vessel in a statement to Reuters on Aug. 10.

"Emmakris III has been chartered by us to carry the wheat cargo in accordance with the terms of the GASC tender," the company said. "The vessel does not belong and has never belonged to a Russian company."

According to the court order, the registered owner of the vessel is Dubai-based company Greater Bloom Limited but Ukrainian officials believe the actual owner is a Russian company.

The company the Ukrainian officials claim is the actual owner did not immediately respond to a request for comment.

Egypt, typically the world's largest wheat importer, depended heavily on shipments of Black Sea wheat that were disrupted by Russia's Feb. 24 invasion for its subsidized bread programme. It now seeks to diversify wheat supplies, buying more than a million tonnes in July through tenders and direct purchases in an effort to boost its strategic reserves.

Egypt's supply ministry did not respond to a request for comment.