A young Bahraini prisoner died of wounds he suffered during a police operation to detain him on charges of weapons smuggling, the interior ministry said on Sunday.
However, the Gulf kingdom's main Shiite political opposition group said the man died on Saturday as a result of torture during his detention.
A ministry statement said Fadel Abbas Musalem, 20, had been taken to hospital after being "wounded in the head" on January 8 when police tried to arrest him in a Shiite village near the capital Manama.
It added that police acted in "legitimate defence" when they fired on a car carrying Mussalem and another man when it kept driving towards security forces despite warning shots.
The other man was also arrested.
Musallem was part of a group suspected of "involvement in smuggling weapons and explosives and in terrorist acts", the ministry added.
Bahrain's state prosecutor said on Sunday the group had received training abroad to carry out "terrorist acts", saying several members had been arrested with "weapons and explosives".
But the main Shiite opposition group Al-Wefaq said Musallem had been tortured "savagely".
Signup to our newsletter and follow us on Facebook and Twitter!
It said in a statement that besides a wound to his head, his body had signs of "bruises on his back, around the neck and on his face".
His lip had also been cut and he had a "deep wound to the right shoulder", Al-Wefaq said.
Thousands of people attended his funeral on Sunday in Daraz, a Shiite village near Manama, chanting anti-government slogans, witnesses said.
Security forces later intervened when "saboteurs threw Molotov cocktails at them and closed a main road", the interior ministry said on Twitter.
A month-long protest that erupted on February 14, 2011, challenged the regime of the Shiite-majority kingdom that is ruled by the Sunni Al-Khalifa dynasty.
The demonstrations were dispersed in mid-March in a deadly crackdown helped by security forces from neighbouring Saudi Arabia.
At least 89 people have been killed in Bahrain since the protests began, according to the International Federation for Human Rights.
Demonstrators frequently clash with security forces in Shiite villages outside the capital.
Bomb attacks have included one that targeted a Sunni mosque close to the royal court last July. It caused no casualties.