Japan has announced plans to end its reliance on nuclear power within 30 years, in a historic policy shift prompted by the triple meltdown at the Fukushima power plant.

The move to close all 50 of the country's functioning reactors by around 2040 marks a dramatic change of course by a country that had previously championed atomic energy, putting Japan alongside Germany and Switzerland, which also turned away from nuclear power following the disaster.

Japan, the world's third biggest user of nuclear power before the disaster, had planned to increase nuclear's share of the energy mix to 50% by 2030. But the country's attachment to nuclear power was severely weakened after the Fukushima accident sent radioactive materials into the ocean and atmosphere, contaminated the food and water supply, and forced the evacuation of 160,000 residents.

"Based on facing the reality of this grave accident and by learning lessons from the accident, the government has decided to review the national energy strategy from scratch," read a policy document released on Friday. "One of the key pillars of the new strategy is to achieve a society that does not depend on nuclear energy as soon as possible."

The decision comes after two months of public consultations and the largest anti-nuclear demonstrations Japan has ever seen. Local media reports said the cabinet had already agreed to approve the panel's recommendation, with a formal announcement expected soon.

The plan calls for renewable energy to comprise about 30% of Japan's future energy mix – an eightfold rise from 2010 levels – and the development of sustainable ways to use fossil fuels.

In the short-term, however, the shift will force Japan to increase its already heavy dependence on oil and natural gas, calling into question its ability to reach internationally agreed CO2 emissions targets.

"This is a strategy to create a new future," a policy statement said, after key ministers finalised the decision on Friday. "It is not pie in the sky. It is a practical strategy."

The report says Japan should aim to reduce greenhouse gas emissions by about 20% from 1990 levels and to reduce energy consumption through greater efficiency by about 10% from 2010 levels.

Environmental campaigners welcomed the decision, but said the phase-out should have come much earlier. "The government's strategy involves a nuclear phase-out nearly two decades later than needed," said Kazue Suzuki, Greenpeace Japan nuclear campaigner. "It also provides clarity for the business community that renewable power, not nuclear, is the future.

"For too long Japan's leaders have ignored their people and gambled the health, safety and economic stability of every citizen on nuclear power, and as the people of Fukushima continue to suffer, so does the rest of our country. This announcement must become law, otherwise it will be seen as nothing but lip service to buy votes before the coming election."

The report does not specify how the expensive shift to renewables would be funded, or how to minimise the environmental impact of greater fossil fuel use.

The prime minister, Yoshihiko Noda, will be hoping that the decision boosts support for his unpopular administration ahead of a general election expected in November. Recent opinion polls showed most Japanese preferred a phase out over two other options proposed by the government that gave nuclear a limited role.

"We are only at the starting line," Noda said. "Now we are going to begin an extremely difficult challenge. No matter how difficult it is, we can no longer put it off."

However, if, as many expect, Noda's party is replaced by a more conservative administration after the next election, there is no guarantee that the no-nuclear policy will survive.

Japan was briefly without nuclear power earlier this year after all 50 working reactors were closed for safety checks.

No restarts were permitted until the reactors passed stress tests introduced in the wake of the Fukushima crisis and gained the approval of local authorities.

The move away from nuclear has caused concern among Japan's allies. Japan provides nuclear technology expertise to companies in the US, while France and Britain, which reprocess its spent nuclear fuel, have sought assurances that it will continue to accept high-level radioactive waste created by reprocessing.

In June, Noda approved the restart of two reactors in western Japan amid fears that the country would experience power cuts during the summer.

He has come under sustained pressure from business leaders not to abandon nuclear, amid warnings that power shortfalls and the high cost of renewables could stifle production and derail attempts to kick-start the country's export-led economy.

But some analysts said a serious shift towards renewables could benefit the economy. "A total exit from nuclear is positive for the economy, on balance," said Andrew Dewit, a professor at Rikkyo University in Tokyo. "It incentivises Japan's political economy to focus on efficiency and renewables. Japan lags in both these areas and they offer the greatest opportunities for growth."

The phase-out will be achieved by retiring reactors, which were built between the early 1970s and 2006, when they reach the end of an agreed 40-year life span. The report said, however, that some could be restarted before they are closed permanently provided their safety is confirmed by a new regulatory body.

"We will launch all possible policy measures to achieve a nuclear-free society by the 2030s," the report said. "Until the total phase-out we will only use nuclear reactors that are confirmed safe."