Libyan security forces on Tuesday repelled armed demonstrators who had surrounded and stormed government headquarters in Tripoli, a senior official said, adding one person was killed in clashes.
"One person was killed in the confrontation," interim government spokesman Nasser al-Manaa said, speaking from within the government complex just hours after the attack.
And "four people were wounded" in the clashes that broke out when government forces sought to clear the area and open access to the besieged building, he added.
That toll, Manaa said, comprised one of the assailants and three members of the Tripoli High Security Committee, who were asked to rescue the situation after dialogue failed.
Earlier, an interior ministry official said at least two guards died.
Manaa said only that two guards were "hit" without going into details.
The government spokesman told journalists that a group of demonstrators showed up at 9 am (0700 GMT) and that armed men soon joined their ranks.
By noon, the crowd had grown to 200 people, including gunmen from the western town of Yefren backed by some 50 trucks mounted with anti-aircraft guns and rocket launchers.
He said representatives aired grievances including the non-payment of cash stipends for former rebels who fought against the regime of Moamer Kadhafi.
The interim government started evacuating personnel and called for back up after some gunmen forced their way into the building and opened fire, he said.
Earlier, a public official said former rebels opened fire against the establishment with anti-aircraft cannons.
"Some men entered the premises and fired from inside," he said, adding that chaotic scenes unfolded as people scrambled for cover.
Residents in the area reported hearing heavy exchanges of gunfire.
By 5:30 pm, fresh security forces were posted at the back, front and side entrances of the glass government building, which had dozens of its windows shattered in the attack.
Ammunition shells littered the area and the tensions sparked by the incident managed to clear out the capital's normal sunset traffic jams, an AFP journalist said.
It is not uncommon for demonstrators to carry arms when staging rallies in front of government buildings in the capital.
"We don't want this to become a widespread phenomenon," said Manaa, who blamed the violence on the dark legacy of 42 years of dictatorship.
In a message to former rebels, he stressed that there was no need to make "demands through force" and proposed dialogue instead.
Tripoli High Security Committee head Khaled Besher said 14 assailants were arrested.
Tuesday's violence marks the worst attack in Tripoli against Libya's new rulers who have struggled to rein in rogue militias.
But the tough reaction shows the interim authorities are willing to tap on their growing forces to counter threats against state institutions.
The clashes came as Libyans across the country registered to vote in the first national poll in more than four decades. Libyans are expected to vote for a constituent assembly in June.