The owners of a wind turbine factory being occupied by workers won a possession order today.
Vestas Wind Systems took legal action to end the two-week protest by workers at its factory in Newport, Isle of Wight.
The plant was due to close last Friday, with the loss of hundreds of jobs but it was delayed because of the sit-in.
The company successfully applied for a repossession order at Newport County Court today.
Judge Graham White said he was satisfied that legal papers had been served on the group of 11 workers who have barricaded themselves into the factory.
The decision was greeted with boos and jeers by scores of climate change activists and members of the Rail Maritime and Transport Union, who staged a protest outside the court.
Bob Crow, general secretary of the RMT, who was in court for today's hearing, said the union would continue with its campaign to save the jobs.
"The court has made its decision but we will continue with our campaign and the right to work on green energy jobs."
Mr Crow attacked both the company and the Government and said ministers had been "despicable" in not even meeting the workers or the union to discuss the possibility of other work going to the factory.
Earlier today, workers climbed on to the roof of a second Vestas factory in Cowes, also on the Isle of Wight, in support of the Newport protesters.
Many of the climate change campaigners and union activists left the court to march to the Newport factory in a show of solidarity with the workers.
One of the workers inside the factory said the protest would continue even if the occupation was now ended by bailiffs.
"We are just waiting now to see what happens. But we will not stop our protest, we will merely move down the road until we get results."
A large group of protesters, watched over by several police officers, gathered outside the factory and started chanting: "We will fight back."
The demonstrators said they were now waiting for bailiffs to arrive but there was no information about when any move might be made to end the sit-in.
A climate camp has been set up on a mini roundabout outside the factory, with several tents pitched and colourful banners hung from nearby walls including one reading: "Mandelson's green failure."
A spokesman for Vestas said the company was in no hurry to end the occupation.
"We are as patient as we have been all along. We have been in wind turbines for 30 years - we are very patient in everything we do.
"We remain patiently optimistic, hoping for a peaceful solution in the interests of all parties, particularly the people inside."
One of the workers occupying the factory spoke from a balcony, thanking the protesters for turning up in support and calling for a national day of action on Saturday and again next Wednesday.
"We are asking people to down tools or hold a rally to support us. We want the protest to continue but we also want it to remain peaceful.
"The police and security guards are not our enemies - they are just doing their job.
"We believe this place has a future and we shall not give up on that."
Vestas workers said there was little chance of finding another skilled job on the island once the wind turbine business closes.
Sean McDonagh, who works at the Cowes factory, said there were just 145 job vacancies on the Isle of Wight at the moment, with 60 people chasing every post.
Mr McDonagh said he was planning to move to the mainland to find work because he held out little prospect of getting another skilled job.
He said today's court decision had been expected although he described it as a "blow" to the campaign to save the factory.
Many of the banners draped outside the factory and on walls on the industrial estate where the plant is sited were highly critical of the Government.
Mr McDonagh accused ministers of "lying" about creating green jobs, adding that the Government had been "a complete sham".