The search for Malaysia Airlines flight MH370 by a U.S. exploration company has ended, the Malaysian government said Wednesday, with the tragedy remaining unsolved four years on.

Malaysia's Transport Minister Anthony Loke Siew Fook said a Malaysia-led team of international aviation investigators will prepare a final report to be published in July on what has been dubbed the world's greatest aviation mystery.

The Boeing 777 vanished on March 8, 2014, with 239 people on board, 40 minutes after taking off for Beijing from Kuala Lumpur International Airport.

(Signing ceremony for search operations for missing Malaysia Airlines flight MH370, outside Kuala Lumpur on Jan. 10)

Under the agreement it entered into with the government, Ocean Infinity was to be paid up to $70 million only if it succeeded in locating the debris field or the flight data and cockpit voice recorder within 90 days. Days spent on port calls for refuel and resupply were not to be counted.

Based on radar and satellite communications, the plane was calculated to have plunged into the southern Indian Ocean, sparking an earlier massive hunt led by Australia.

The Australian-led search had spent nearly three years scouring 120,000 square kilometers before the hunt was declared over in January 2017.

Ocean Infinity began its search in January and combed a further 112,000 square km, way above the initial target of 25,000 square km, but still came up empty handed.

"We regret very much. We understand the feelings of the relatives but we cannot allow the search to go on forever," Prime Minister Mahathir Mohamad told reporters after chairing a weekly Cabinet meeting.

"If we find any new information, we may resume the search," he added.

In a separate press conference, Loke said the search by Ocean Infinity ended on Tuesday.

"Despite every effort using the best technology available, modelling and advice from a highly skilled team of experts as well as search operation crew who are the best in their filed, unfortunately, the search has not yielded the result we hope for," he said.

Ocean Infinity in a statement issued on Tuesday expressed its disappointment with the outcome of the search.

"Whilst clearly the outcome so far is extremely disappointing, as a company, we are truly proud of what we have achieved in terms of the quality of data we've produced and the speed with which we covered such a vast area," its chief executive officer Oliver Plunkett said.

"We sincerely hope that we will be able to again offer our services in the search for MH370 in future," he added.

Since the plane went missing four years ago, Loke disclosed that the Malaysian government has spent some 500 million ringgit (about $125 million) to fund the search.

Thus far, over two dozen pieces of debris have been found but only three have been confirmed as belonging to the ill-fated plane.

Crucial items like the flight data recorder and cockpit voice recorder, also known as black boxes, have not been recovered.

Loke said the Malaysian International Civil Aviation Organization Annex 13 Safety Investigation Team for MH370 will finalize its report by July.

He promised full disclosure in the final report on MH370.

The MH370 Response Team led by Azharuddin Abdul Rahman, head of the Civil Aviation Authority of Malaysia, will continue to oversee all matters relating to MH370.