The residents of Gibraltar delivered a near-unanimous rebuke to British Prime Minister Tony Blair's plans to end 300 years of enmity with Spain by agreeing to share sovereignty over this tiny outpost.

In a referendum here Thursday, 17,900 people, or 98.97 percent, voted against the idea of joint sovereignty. Only 187 people, or 1.03 percent, voted in favor of the concept, far fewer than even the referendum organizers had predicted, and too few, they said, for Britain or Spain to claim even marginal support for altering the status quo.

"The result is absolutely spectacular," Gibraltar's elected chief minister, Peter R. Caruana, told local Gibraltar television in an interview after the announcement of the result. "I am absolutely delighted." Referring to the tiny number of yes votes, Caruana said, "I had a worry that it might be higher."

When the result was read at the conference center here, and broadcast on a large screen in Gibraltar's main square, hundreds of people awaiting the outcome burst into cheers.

In a fiery speech broadcast live, Caruana called on the British government to heed the result and drop its current negotiating line with Spain. British officials, prodded by the European Union, had earlier set a goal of reaching an agreement with Spain this year, and they have called this referendum irrelevant and eccentric.

"Take stock of this result," Caruana said in his speech. "It is the will of the people of Gibraltar."

In a statement tonight, Britain's minister for Europe, Denis McShane, sounded a conciliatory tone. The result of the Gibraltar government's referendum comes as no surprise, he said, according to the Reuters news agency.

"Many on the Rock have long had serious concerns about a dialogue with Spain," the statement said. "I understand that, and will continue to listen to people's views. But the fact remains that there can be no stable future for Gibraltar while the dispute with Spain remains and important issues remain unresolved."