* Freedom and Direct Democracy a new far-right party

* Founder has urged Czechs to walk pigs near mosques

* Result could give party chance to have say in government talks

By Robert Muller and Jan Lopatka

PRAGUE, Oct 21 (Reuters) - A far-right party whose leader wants to quit the EU and urged Czechs to walk pigs near mosques and stop eating kebabs, performed surprisingly well in an election, potentially giving it a chance to influence how the next government is formed.

The Freedom and Direct Democracy (SPD) party rode a wave of far-right sentiment in Europe in an election that ravaged the more established political parties and looked set to hand power to maverick tycoon Andrej Babis.

The SPD was set up in 2015 by Tomio Okamura, a half-Japanese entrepreneur who made his name by creating an off-beat travel agency for cuddly toys before entering politics.

"We want to stop any Islamisation of the Czech Republic, we push for zero tolerance of migration," Okamura told reporters after his party won just under 10.7 percent of the vote, almost neck-and-neck with two other parties who were runners-up to Babis's ANO party.

Okamura was first elected to the lower house for the Dawn party, which fought to install direct voting for most political posts and won 6.9 percent in the 2013 election, He was later ousted in a spat over irregularities in party finances.

This time around, Okamura pounced on anti-foreigner feeling that has soared in the nation of 10.6 million, despite record-low unemployment, growing wages and relatively little immigration.

"I voted for SPD because their opinions are close to mine, I am also against migrants arriving here," said Pavel, an unemployed worker, leaving a polling station in Prague.

Okamura has also played on euroscepticism among many voters and attacked the Roma minority.

"The European Union can't be reformed. It only dictates to us. We refuse the multicultural European superstate. Let's leave the EU," Okamura said at a party leaders' debate just before polls opened on Friday.

Born to a Czech mother and Japanese father, Okamura grew up in both the Czech Republic and Japan. He later sold popcorn at cinemas in Japan and ran a travel agency which took clients' plush toys around the sights of the Czech Republic.

He was not always on the extreme right. Political analysts say he began courting voters with more hardline views after forming the SPD in 2015.

In 2011, Okamura was on a jury at the Miss Expat beauty pageant, featuring immigrants to the country. Two years later he posted a picture of his Czech girlfriend wearing Islamic dress to enter a mosque in London as he praised the assistance she received there, calling it a "fine experience".

"When he (Okamura) established his first party, he based it on direct democracy and punishment for bad politicians. Only after his ousting did he add the cheapest thing, the 'virtual threat' of migration," said Pavel Saradin, political science lecturer at the Palacky University in Olomouc.

Saradin called the threat "virtual" as the Czech Republic was bypassed by the immigration wave seen elsewhere in Europe in the last two years and has only a tiny Muslim minority.

But the anti-immigrant message Okamura seized on has had wider backing in the Czech society, with all major political parties rejecting a quota system for redistributing migrants that have arrived in the European Union.

President Milos Zeman, formerly leader of the pro-European centre-left Social Democrats, shared the podium with far-right anti-immigration activists during the 2015 celebrations of the country's democratic revolution.

This weekend's election winner Babis, himself a rich businessman, will need partners to form a government.

Given that he faces fraud charges -- which he says are trumped-up -- several mainstream parties have already rejected being in government with him. This could potentially make an opening for the SPD which could supply its votes to back Babis's administration in return for policy concessions. (Editing by Michael Kahn and Robin Pomeroy)

Our Standards: The Thomson Reuters Trust Principles.