Formula One world champion Sebastian Vettel won the Grand Prix in Bahrain on Sunday while rage boiled beyond the track among protesters who say the ruling family that crushed Arab Spring demonstrations last year should not have hosted the race.
High security kept trouble well away from the track, where Red Bull's Vettel had started in pole position in a race that passed without incident. But demonstrators said the nightly violence over the past week showed the authorities' determination to go ahead with the race this year was a mistake.
They miscalculated. They thought cancelling the race would be a defeat for them but they didn't realise the cost of holding the race, Shi'ite activist Alaa Shehabi said by telephone.
They didn't factor in the negative branding.
Thousands of people took to the streets in pro-democracy protests in the Shi'ite villages dotted around Manama this weekend and demonstrators have hurled petrol bombs at security forces who responded with teargas, rubber bullets and birdshot.
The luxury sporting event was the government's chance to show that life is back to normal in the island kingdom after security concerns over anti-government demonstrations forced last year's race to be delayed, then cancelled.
Some teams have expressed frustration at the attention on politics. Vettel said shortly after arrival on Thursday that he thought much of what was being reported was hype.
He looked forward to getting in the car and dealing with the stuff that really matters - tyre temperatures, cars.
Finland's Kimi Raikkonen was second for Lotus on Sunday with French team mate Romain Grosjean in third place.
On Sunday, black smoke from burning tyres wafted over Budaiya, a village outside the capital that saw mass protests this week.
A protester was found dead on Saturday after what opposition activists said was a police beating, infuriating the Shi'ite Muslim majority that complains of marginalisation by the Sunni ruling family and brutality since last year's crackdown.
The funeral of Salah Abbas Habib, 36, could be held later Sunday if his family recovers his body, setting the stage for riots on race day. However, authorities have sometimes held on to bodies for days or weeks.
Forumula One and Bahraini officials have dismissed suggestions the race should not have been held and for those inside the Formula One bubble, far from the scenes of protest, the unrest had little impact.
The race is sponsored by a string of global brands. Thomson Reuters, parent company of Reuters, is a sponsor of the Williams Formula One team.
Teams raced around the Bahrain International Circuit amid the usual security precautions. The highway to the circuit was lined with police cars.
Bahrain, a close military ally of the United States, is the only one of the Gulf monarchies to have been seriously threatened by Arab Spring protests that brought down the rulers of Tunisia, Egypt, Libya and Yemen since the start of 2011.
Its government crushed protests last year, swept demonstrators off the streets and bulldozed the traffic circle where they had camped. Thirty-five people, including security forces, died in that crackdown. Since then, Shi'ite areas have remained volatile and clashes have increased in recent months.
Our initial demands were to elect a new government but after the disgusting abuse we received, all the people are asking for is for the regime to fall, said protester Ahmed Madani during a march of 7,000 people on the eve of the race.
Some banners held up during the march depicted Formula One drivers as riot police, bashing protesters. The march was followed by clashes in several districts which saw protesters hurl Molotov cocktails and police respond with teargas.
The Bahrain government commissioned an independent inquiry after last year's crackdown and says it is enacting reforms. Human rights groups say it is moving too slowly.
King Hamad bin Isa al-Khalifa, who attended the Grand Prix, said in a statement overnight he wanted to make clear my personal commitment to reform and reconciliation in our great country. The door is always open for sincere dialogue amongst all our people.
Staff of two teams witnessed petrol bomb-throwing incidents and some members of the Force India team left Bahrain. But most of the travelling Formula One entourage have had no interaction with the violence taking place mainly outside the capital.
Phil Mitchell of Britain, who lives and works in Bahrain and had come to watch the event, said he was just looking forward to a really good race today.
There is definitely more security. But not marked. I think it's just a precautionary measure.
Bahrain's government is thought to have paid $40 million to host the event, a symbol of pride for the ruling family since it brought the first Grand Prix to the region in 2004. When it was last held in 2010, the race drew more than 100,000 visitors and generated $500 million in spending.
While motor sports journalists were invited to cover it, reporters from Reuters and some other news organisations who normally write about Middle East politics were denied visas.
Hackers brought down the F1 website intermittently on Friday and defaced another site, f1-racers.net, to support what they described as the Bahraini people's struggle against oppression.
The F1 website was back up on Sunday.
The hunger strike of Abdulhadi al-Khawaja, one of 14 men jailed for leading last year's uprising, is further inflaming anger on the street. His health has entered a critical stage after more than 70 days. His family says he stopped taking water on Friday, raising fears for his life.
Bahrain's state news agency said in a statement that Khawaja was in good health and stable and receiving full medical attention, citing Attorney General Abdelrahman al-Sayed, after a visit by a public prosecutor.
Khawaja also met on Sunday with the ambassador from Denmark, where he also holds citizenship, and which has asked for Khawaja to be released into their care, the agency said.
(Additional reporting by Rania el Gamal in Dubai; Writing by Isabel Coles and Reed Stevenson in Dubai; Editing by Peter Graff and Philippa Fletcher)