Several people have been wounded when armed men stormed Libya's parliament in the capital, Tripoli, causing politicians to postpone the selection of a new prime minister.
Omar Hmeidan, a spokesman, told the Reuters news agency that Tuesday's attack was started by gunmen linked to one of the defeated candidates for prime minister.
"Armed men have besieged the Congress, but we do not know the motive of the attack," Tahar Mokni, a member of Libya's parliament, told the AFP news agency.
Al Jazeera's Mahboud Abdul-Wahed, reporting from Tripoli, said that the "fighting started when the armed group engaged in random shooting using assault rifles in front of the temporary headquarters of the General National Congress."
The country's parliament voted on March 11 to oust then Prime Minister, Ali Zeidan, and was holding a special session to choose a new leader.
Hmeidan said that deputies had started the final vote on a replacement for the interim prime minister, Abdullah al-Thinni, who resigned two weeks ago, saying that gunmen had attacked his family.
In the first ballot, businessman Ahmed Maetig came out on top among seven candidates. A second round between Maetig and Omar al-Hassi, the runner-up, was supposed to take place when gunmen burst into the assembly.
Al Jazeera's Abdul-Wahed said that the armed group, from Benghazi, "wanted to put pressure on the General National Congress members to elect their own candidate from Benghazi, whose name is Omar al-Hassi".
He added that the attack was "a major handicap for the democratic process in Libya".
The government has struggled to control armed groups who helped oust Muammar Gaddafi in 2011.
Fighters have repeatedly attacked the interim GNC to make political or financial demands.
The proceedings and the vote for a new prime minister have been postponed until next week.