Image caption The government had said the subsidy cut would ensure the scheme carried on in the future

Government plans to cut subsidies for solar panels on homes have been ruled legally flawed by the High Court.

The government had said that subsidies for households that installed solar panels would be halved from 12 December.

Environmental charity Friends of the Earth and two solar companies went to court to test whether the proposals were lawful.

The government has said it would defend a challenge at judicial review.

Under the feed-in tariffs programme, people in Britain with solar panels are paid for the electricity they generate.

The new tariff of 21p per kilowatt-hour, down from the current 43p, had been expected to come into effect from 1 April, but in October the government said it would be paid to anyone who installed their solar panels after 12 December.

The tariff for surplus electricity exported to the national grid will remain at 3.1p per kilowatt-hour.

The government had said the subsidy cut would ensure the scheme carried on in the future.

Friends of the Earth (FoE) and solar companies Solarcentury and HomeSun argued that that cut-off point - which came two weeks before the Department of Energy and Climate Change (DECC) consultation on changes to the scheme was due to end - was unlawful.

They said the lower subsidy could cost tens of thousands of jobs and bankrupt businesses, and had already led to unfinished or planned projects being abandoned.

But FoE said it was not opposed to cuts in the tariff.

Friends of the Earth's Executive Director, Andy Atkinsm said: "These botched and illegal plans have cast a huge shadow over the solar industry, jeopardising thousands of jobs.

"Solar payments should fall in line with falling installation costs but the speed of the government's proposals threatened to devastate the entire industry."

The government's decision has already been criticised by the CBI and the Local Government Association, which warned it would cost councils who had attempted to roll out the technology to poorer households hundreds of millions of pounds.

The public consultation on plans to slash the subsidy will remain open for comment until 23 December.