An application to start fracking at a site on the Fylde coast in Lancashire has been rejected by councillors.
Energy firm Cuadrilla wanted to extract shale gas at the Little Plumpton site between Preston and Blackpool.
Lancashire County Council rejected the bid on the grounds of "unacceptable noise impact" and the "adverse urbanising effect on the landscape".
Cuadrilla said it was "surprised and disappointed" and would consider its "options" regarding an appeal.
A spokesman added: "We remain committed to the responsible exploration of the huge quantity of natural gas locked up in the shale rock deep underneath Lancashire."
'Triumph for democracy'
The Little Plumpton bid had been recommended for approval by the county council's planning officials, subject to working hours, noise control and highway matters.
But councillors rejected the advice and voted 10-4 to refuse the application.
Councillor Marcus Johnstone described the deliberation as "one of the biggest planning decisions ever" for the council.
He said the committee had rejected the application after "listening carefully to many hours of evidence".
A legal adviser had said any attempt to block fracking at the site on environmental grounds would be "unreasonable" and costly.
Dr Adam Marshall, from the British Chambers of Commerce, said the decision was "perverse, short-sighted and timid" and said "the government now needs to step in".
A related application for a monitoring array, to study seismic activity and water quality, was also rejected.
An application to start a fracking operation at Roseacre Wood was also rejected on Thursday.
Anti-fracking protests were held outside the hearing in Preston, which began on 23 June.
Fracking - or hydraulic fracturing - was suspended in the UK in 2011 following earth tremors in Blackpool where Cuadrilla previously drilled.
It is a technique in which water and chemicals are pumped into shale rock at high pressure to extract gas.
At the scene
Helen Carter, BBC News reporter
For a moment, there was silence as the planning committee voted on a motion to turn down the Little Plumpton planning application.
That was followed by a huge roar of approval and a boo as two councillors had abstained.
People wept openly but they were tears of joy, not disappointment.
A chorus of "Frack free Lancashire" sounded outside County Hall. Then "Frack free world."
Fylde deputy mayor Heather Speak said she felt like she had won the lottery.
Jamie Peters of Friends of the Earth wept and said it "shows people power has worked." He said it had been grassroots campaigning. "The councillors have listened to what people want," he said.
Chris Riley from Kirkham said it was brilliant they had overturned both decisions, adding: "We were hoping they would, but they couldn't possibly go ahead with the damage it would cause."
Another protester said: "It is brilliant. But this is just round one."
The jubilant anti-fracking campaigners marched through Preston for a spontaneous rally outside Lloyds Bank in Fishergate.
They were told: "Keep up the fight," amid cheers.
Katherine Seary, from Bipsham, with her dog Molly, who was wearing an anti-fracking T-shirt feels "ecstatic."
She said: "[I] couldn't believe my ears" initially, "It took me a second listen to take it in."
"I am sure Cuadrilla will appeal, but it is a good start."
Although there was a strong police presence, one said: "Well done, ladies," to a group of protesters.
Greenpeace UK energy and climate campaigner Daisy Sands said the decision was "a Waterloo for the fracking industry" and a "triumph for local democracy".
She said: "Their decision sends a powerful signal to other councils that the fracking juggernaut can indeed be stopped."
Furqan Naeem, from Friends of the Earth North West, said campaigners will "breathe a sigh of relief - safe in the knowledge that this dirty industry... has been stopped in its tracks once again".
"The stakes for local people, for democracy and for the environment could not be higher. The fight against fracking and dirty energy is far from over."
Where is Little Plumpton?
Little Plumpton is a hamlet between Blackpool and Preston on the Fylde coast.
According to the electoral register, there are just five households surrounded by green fields containing dairy herds and crops.
In total, there are 13 people on the electoral roll who live in Little Plumpton. There is no pub or village shop as it is too small.
The houses are very close to Cuadrilla's proposed site on Preston New Road.
The North West Energy Task Force, partly supported by Cuadrilla, called the decision a "missed opportunity".
Babs Murphy, North & Western Lancashire Chamber of Commerce chief executive, said: "In turning down this proposal, councillors appear to have ruled with their hearts, rather than their heads, and ignored the reasoned arguments of those with genuine expertise in this industry.
She said it was "bad news for local businesses".
When asked for the Prime Minister's response to the fracking decision, David Cameron's official spokeswoman said: "We respect the planning process. We will continue to look at how we can develop this industry in the UK."
Analysis: Judy Hobson, BBC North West Tonight Environment Correspondent
Anti fracking campaigners are celebrating but this decision does not spell the end of fracking in the North West or the UK.
Cuadrilla is likely to appeal. The government could overrule the decision - and this government is committed to establishing a shale gas industry.
But today's decision is a set back for the industry. A yes vote would have been the biggest step towards fracking so far and could have changed the public mood.
Planning officers in Lancashire saw no reason to turn down Cuadrilla's application to test frack at Preston New Road. Questions will now be asked as to why they did.
Fracking may still come to Lancashire, but it may now happen somewhere else in England first.
This isn't the end of the story, but anti-fracking campaigners can claim victory for now.
The decision shows there may still be a long way to go before fracking is given the green light here in Britain.