Armed men fatally wounded one person and left several others injured at a Tripoli fairground on Friday night, security officials and police said.
"A group of criminals savagely opened fire at a fairground at Omar Mokhtar Street in Tripoli wounding three people but a seriously hurt woman died from her wounds when she arrived at the hospital," said Tripoli security headquarters on Facebook.
The attack came as Libya's army deployed reinforcements in the capital and its suburbs to bolster security after weeks of deadly violence.
Police said "six other people suffered bruises in the stampede".
Witness Ali al-Khomsi told AFP that "after a fight broke out at the fairground between young people and security guards, a group of armed men opened fire killing three people".
Signup to our newsletter and follow us on Facebook and Twitter!
He said the attackers had "jumped over the wall surrounding the playground ... randomly shooting into the crowd" on the second day of the Eid al-Fitr holiday marking the end of Ramadan.
The official Libyan news agency LANA said troops were deployed in several parts of the capital and its suburbs in a bid to "reassure people during Eid al-Fitr".
Libya has been hit by lawlessness and deadly violence since the overthrow of veteran dictator Moamer Kadhafi in a 2011 uprising.
Over the past few weeks Tripoli and its surrounds have been rocked by attacks and clashes between rival militias who helped topple Kadhafi.
Violence, including political assassinations, has also proliferated in the eastern city of Benghazi, cradle of the uprising.
On Friday, unknown gunmen shot dead Libyan doctor Azzedine Koussos, who hosted a television programme on human development.