Some in the crowd then threw eggs at the bar guarded by riot police in the south-western town of Bayonne.
Nicolas Sarkozy described the protesters – Basque nationalists and supporters of his rival Socialist candidate Francois Hollande – as “hooligans”.
The president left the bar after about an hour.
The Basque region straddles south-western France and northern Spain.
Some chanted “Nicolas kampora”, which in the Basque language meant “Nicolas get out”.
Nicolas Sarkozy was also showered with campaign leaflets calling for greater Basque autonomy.
Riot police had to be deployed around the Bar du Palais, where the president took refuge.
Visibly angry, Nicolas Sarkozy later denounced “the violence of a minority and their unacceptable behavior”.
“Here, we’re in France, on the territory of the French republic, and the president of the republic will go everywhere. And if that doesn’t please a minority of troublemakers, too bad for them,” Nicolas Sarkozy said.
The president also said he was “saddened to see Hollande’s Socialist militants associating with [Basque] separatists in violent protests to terrorise ordinary people who want just one thing: to meet and talk with me”.
A senior member of Francois Hollande’s campaign team later said that while the party leader condemned any violence, no Socialist was involved in the Bayonne incident, the AFP news agency reports.
Opinion polls show that Nicolas Sarkozy is lagging behind Francois Hollande, although the current president is narrowing the gap.
Ydtnk3qp_wIImage source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…