The proposed development would see the turbines offshore
A controversial windfarm looks likely to be built off the south Wales coast after the failure of a last-minute challenge in the Welsh assembly.
Some AMs had tried to force another debate on the proposal, but were defeated in a vote on Tuesday.
Plans for 30 turbines at Scarweather Sands off Porthcawl, had already been approved by AMs in July.
That decision overruled a public inquiry planning inspector who came out against the scheme last November.
On Tuesday, Conservative AM Alun Cairns led the group seeking to frustrate the proposal.
But the motion was defeated by 34 votes to 16, with two abstentions.
The scheme is now likely to go ahead, although objectors could press for a judicial review.
Local Government Minister Sue Essex had already said she intended to make the order to build the windfarm, which will be three miles out into the Bristol Channel.
Those opposing the plans claim it will be an eyesore. Those in support say it will help create a greener Wales.
After Tuesday's failed vote, Mr Cairns, AM for South West Wales, said he was disappointed and angry.
"I fail to understand how any AM could vote against a motion calling for further debate," he said.
Visitors were shown this image by Greenpeace during a survey
Peter Ogden, director of the Campaign for the Protection of Rural Wales, said the vote marked "a sad day for anyone who understands why Wales is a special place".
But the windfarm has been welcomed by both Greenpeace and Friends of the Earth Cymru.
The public inquiry held last year was the longest into a windfarm ever held in Wales, with thousands of pages of evidence considered.
The inquiry inspector concluded: "The visual impact of a windfarm in the specific location of this proposal would be so prominent when viewed from Porthcawl and its immediate area that I consider that the harmful effects on this view are sufficient to outweigh the benefits of this particular proposal."
But Gordon James, of Friends of the Earth Cymru, argued there had been an over-emphasis in the public inquiry report on the visual impact of such a development.
Opponents of the development have formed an action committee and have collected an 8,000-name protest petition.
They said tourism was a key industry in Porthcawl and employed 18% of the workforce.
Tom Anderson, a member of the committee of local residents and businesses, said: "This is the most heavily-opposed development since the flooding of Welsh valleys for reservoirs nearly 50 years ago."
He added: "The planning development committee decision has thrown into disrepute the planning process in Wales."