Correction: An earlier version of this article incorrectly said the jailed House of Commons member from Eastleigh was a Conservative. He was a member of the Liberal Democrats. This version has been corrected.

The United Kingdom Independence Party leader Nigel Farage checks his watch as he waits to make his keynote speech to the UKIP 2013 Spring Conference in the Great Hall at Exeter University on March 23. (Matt Cardy/Getty Images)

For the United Kingdom Independence Party, defeat has never looked this much like victory.

After a Liberal Democrat member of the House of Commons was jailed on criminal charges, this struggling railroad town near the English Channel held a special election to pick his successor. The anti-immigrant U.K. Independence Party (UKIP) took up the challenge, setting up offices next to a Turkish kebab shop and narrowly losing its bid to win its first elected seat in the British Parliament.

Its best-yet showing in a national race has, nevertheless, thrust into the national limelight a political movement that is part of a wave of anti-immigrant populism surging across Europe. The outcome of the Feb. 28 vote, coupled with national polls showing UKIP support at an all-time high, seemed to terrify Britain’s three traditional parties. In response, the Conservatives, the Labor Party and the Liberal Democrats are suddenly tripping over each other in a race to see who can more closely echo the Independence Party’s hard-line pledge to get tougher on immigration.

UKIP’s ability to spark a policy stampede without even winning a seat in Parliament underscores the increasing capability of anti-immigrant forces to set the agenda amid Europe’s economic malaise. An issue at the core of the party’s platform is the withdrawal of Britain from the European Union to stem the tide of immigration — as an E.U. member, Britain is legally bound to allow the citizens of 24 other European countries to resettle here with few restrictions — which speaks to the concerns of a continent where a debt crisis and high employment are increasingly making foreigners the target of popular rage.

That fear is surging as countries including Britain, Germany and France prepare for new flows of migrants from two of Europe’s poorest countries — Bulgaria and Romania, whose citizens will win unlimited access to the E.U.’s labor market as of Jan. 1.

With concern growing that the Independence Party will poach more and more voters from the political right, Prime Minister David Cameron, a Conservative, last week announced a plan to make it tougher for recently arrived immigrants to claim welfare benefits. The government additionally announced a dramatic makeover of the U.K. Border Agency to deal more expeditiously — and harshly — with illegal immigrants.

Not to be outdone, Nick Clegg, the deputy prime minister from Cameron’s junior coalition partner, the Liberal Democrats, announced his own plan to control illegal immigration. In a speech less than three weeks after the vote in Eastleigh, Clegg vowed to force visitors from countries with high numbers of visa violators to post a $1,500 bond — with the cash returnable only upon their departure from Britain.

At the same time, Ed Miliband, leader of the opposition Labor Party, has offered a mea culpa for lax immigration policies during his party’s rule from 1997 to 2010, a period when net migration to Britain soared. In an apparent reference to then-Prime Minister Gordon Brown’s campaign gaffe in 2010 — when the Labor leader was caught off camera describing an elderly white woman as “bigoted” for complaining about immigration — Miliband said: “It’s not prejudiced when people worry about immigration. It’s understandable. And we were wrong in the past when we dismissed people’s concerns.”

Although not wholly new — Britain’s top parties have for years been leaning toward tougher immigration policies— observers say the steps taken since the Independence Party’s surge have amounted to some of the most aggressive yet.

“There is no doubting the influence of UKIP is now being felt in our immigration debate, partly because the main parties have refused to have a debate about this before,” said Keith Vaz, a Labor Party lawmaker. “We should stamp out illegal immigration, but we also need to avoid an arms race between the parties as they react to UKIP support.”

With a debt crisis and deep austerity entering their fourth year, Europe is facing a period of record unemployment that has allowed unpredictable political forces to take root. By comparison to some of these unconventional movements — such as the neo-Nazi Golden Dawn in Greece — the U.K. Independence Party is relatively mild.

The party was founded in the 1990s by British politicians furious about London’s acceptance of the Maastricht Treaty, which created the European Union. Today, the party is led by the spiffily dressed Nigel Farage — a savvy, speaks-in-sound-bites politician known for his dry sense of British humor. Although he is campaigning heavily for Britain to leave the E.U., his wife is a German national. Under his leadership, the party has largely avoided the racially and religiously tinged jabs against Muslim immigrants taken by, say, the Nationalists in France.

Rather, UKIP ascribes to a school of thought always just under the surface in Britain — that this is a nation that is culturally apart from Europe and has no business being part of that exotic world across the English Channel. Those sentiments have been exacerbated by an influx of hundreds of thousands of Europeans — mostly from the east — who over the past two decades have taken advantage of the E.U.’s open-borders policy to find jobs and resettle in Britain.

Tougher restrictions imposed by Cameron’s government have led to a decline in immigrant inflows — particularly of non-E.U. foreign students — since 2010. But Farage has tapped into a vein of thinking here that Britain’s answer needs to be more radical. Under pressure from his own party and an increasingly anti-E.U. public, Cameron has promised to hold a landmark referendum on Britain’s membership in the union by 2017 — a date that Farage says Britain must move up.

“Cameron is Mr. Slippery; you wouldn’t want to buy a used car from that man,” said Farage, who had the highest “satisfaction rating” — 35 percent — among all British political leaders in a recent Ipsos MORI poll. “He has offered a referendum only if he wins the next general election, and we might get lucky under him to see it by 2017. But I don’t want to wait. Britain wants out.”

Yet, in recent years, the Independence Party’s successes were largely limited to securing a few seats in the European Parliament — an E.U. lawmaking institution that few in Britain seem to take seriously. The party’s best shot at national office came here in Eastleigh, where UKIP came second with 27.8 percent of the vote, ahead of the Conservatives and Labor. Due in part to an electoral system that makes it relatively hard for smaller parties to win seats in Parliament, UKIP faces an uphill battle to enter the House of Commons in the next national elections, in 2015. But the close race in Eastleigh has the party energized to launch a national campaign.

The party’s success in wooing this town that has fallen on hard times as manufacturing jobs were shipped overseas has shocked some in the immigrant community. Iskender Anik moved 13 years ago from Turkey to Eastleigh, where he runs the kebab shop next to which UKIP set up its campaign offices. He says he hasn’t experienced any problems from the party’s supporters, but he also suggests that those who say immigrants are stealing British jobs should open their eyes.

“You think we could get an English person to work here?” he said, pointing at a pungent rotisserie of well-oiled lamb with a laugh. “They don’t want to do this kind of work. They only want to sit in nice office jobs and spin around in their chairs all day. They go on benefits if they can’t find that kind of work. Immigrants are not the problem.”