The city has been the scene of fighting between rival militias since April. A U.N.-supported but weak government holds the capital, but the self-styled Libyan National Army — which is associated with a rival government in the country's east — is trying to seize it.
It wasn't immediately clear who was behind the attack. However, LNA spokesman Ahmed al-Mesmari blamed the attack on militias allied with the Tripoli-based internationally recognized government. "This is one of the systematic crimes carried out by militias against civilians," he wrote on his official Facebook page. "In order to eradicate them and avenge the murdered, the battle shall continue."
Earlier this week, the Tripoli-based Government of National Accord held the LNA responsible for the shelling of a civilian residence that killed at least three civilians and the wounding of two, including children. The LNA denied the accusation saying that it targeted a military camp that the Tripoli militias used as an "operations room."
The battle for Tripoli has stalled in recent weeks, with both sides dug in and shelling one another along the city's southern reaches. The months of combat have killed hundreds of people and displaced thousands.
The fighting threatens to plunge Libya into another bout of violence on the scale of the 2011 conflict that ousted and killed longtime dictator Moammar Gadhafi.
Separately, Libya's coast guard said that it has rescued 82 Europe-bound migrants, including 11 women and eight children off the country's Mediterranean coast.
The rubber boat carrying migrants from Syria, Bangladesh, Sudan and many other African countries was stopped on Wednesday 40 miles (64 kilometers) to the north of the western town of Zawiya, according to a statement released on Thursday by Libya's navy.
Libya has emerged as a major transit point for migrants fleeing war and poverty to Europe. In recent years, the European Union has partnered with the coast guard and other Libyan forces to try to stop the dangerous sea crossings.
Rights groups, however, have criticized those efforts, saying they've left migrants at the mercy of armed groups or confined in squalid detention centers rife with abuses.
Also on Thursday, the U.N. Support Mission in Libya called for the immediate release of lawmaker Seham Sergiwa, who was abducted in mid-July by gunmen from her house in the eastern city of Benghazi — the Libyan National Army stronghold.
"We will continue to lift our voices to demand her release and that those responsible for her violent abduction be held accountable," the UNSMIL statement said.
Since her kidnapping, Libya's eastern authorities have failed to reveal her whereabouts.
The Tripoli-based government, as well as some members of her family, accused forces loyal to Khalifa Hifter, the LNA commander, of being behind the 56-year-old parliamentarian's disappearance.
Although a member of the east-based parliament known for its loyalty to Hifter, Sergiwa was a vocal critic of the Libyan National Army offensive on Tripoli.
In Thursday's statement, the UNSMIL condemned Sergiwa's kidnapping as an attempt "to silence one of Libya's prominent female voices and to intimidate other women seeking to participate in the country's political life."
Several rights groups have previously said that Libyan militias on all sides of the conflict have committed human rights abuses, including abducting activists, journalists and rights activists.