Malaysia Airlines will be taken off the stock market as part of a government bid to rescue the troubled company.

State investor Khazanah, which owns nearly 70% of the airline, is planning to buy out small shareholders as a first step to overhauling the national carrier.

The fund said it would announce more details by the end of August.

"The proposed restructuring will critically require all parties to work closely together to undertake what will be a complete overhaul," it said in a statement.

Shareholders will vote on the plan at an extraordinary general meeting. Meanwhile, Malaysia Airlines will continue to operate all current flights.

After taking the business private, management could sell assets such as Firefly, its budget unit.

Related: 3 things Malaysia Airlines must do to survive

Malaysia Airlines was in big financial trouble before the twin disasters of Flight 370 and Flight 17 claimed the lives of 537 people.

Those tragedies would force changes to the way the company operates, Malaysian Prime Minister Najib Razak said.

"We believe our national carrier must be renewed," he said. "This means wholesale change, to deliver a wholly different outcome."

The airline was once a symbol of national pride. But it hadn't turned a profit in years, efforts to compete with low-cost carriers had failed, and the need for yet another government bailout was growing.

Analysts have long argued that Malaysia Airlines needed to slim down, and drop flashier features of a flag carrier.

For example, the airline could operate fewer full-service flights and increase seat counts.

Related: Passengers' families could collect millions

MH17 was shot out of the sky in July, over territory that's controlled by pro-Russian militants battling the Ukraine government. The United States says a surface-to-air missile took down the plane.

In March, Malaysia Airlines Flight 370 disappeared with 239 people on board. No trace of the plane has been found.