The attack, which a medical source said wounded a total of 18 people, came as a Libyan jet shot down a militia helicopter after Islamist-led fighters launched strikes on the eastern Al-Sidra oil terminal.
The car bomb struck near the back gate of the Dar al-Salam Hotel in the eastern city of Tobruk, where the parliament elected in June took refuge after Islamist-led militias seized control of Tripoli in August.
Farj Buhashem, a spokesman for the legislature, said parliament was meeting on the ground floor when the blast went off.
Lawmaker Tareq Jarushi, speaking to AFP by telephone from Tobruk, said that the blast was caused by a suicide bomber who rammed his car into the back gate.
More From This Section
"Witnesses saw a car painted in military colours ramming the back gate and then explode," said Jarushi.
Jarushi, who is the son of air force chief Brigadier General Saqr Jarushi, said body parts had been found at the scene of the bombing, "indicating that this was a suicide attack."
Three lawmakers who were outside the building at the time were slightly wounded by shattered glass, he said.
The attack comes as the UN mission to Libya, UNSMIL, plans a new round of peace talks between warring factions aimed at ending months of violence and political deadlock in the North African nation.
More than three years after dictator Muammar Gaddafi was toppled and killed in a NATO-backed revolt, the country remains awash with weapons and powerful militias, and has rival governments and parliaments.
The UN-brokered talks are set to take place on January 5, diplomats at the UN Security Council said last week.
The suicide bombing came as militia aircraft, including a chopper, attacked pro-government forces in the so-called "oil crescent" eastern region around Al-Sidra oil terminal, said military spokesman Ali al-Hassi.
"The air force shot down the helicopter as it prepared to land at a military base near Sirte airport, after it had taken part with other aircraft in the air raids," Hassi said.
There were no immediate reports of casualties.