The Afghan parliament has been attacked by Taliban fighters in Kabul, with a series of explosions and gunfire forcing politicians to evacuate.

Al Jazeera's Jennifer Glasse, reporting from Kabul, said five people were killed, in addition to the seven fighters who launched the attack on Monday.

The Taliban claimed responsibility for the raid, which injured at least 21 people, including five women and three children.

About two hours after the initial explosion, police declared the operation had ended with seven attackers being killed - including a suicide car bomber.

"Suicide bombers have attacked outside the [parliamentary] building," she said, adding that gunfire continued to be heard for more than an hour after the first explosion. "There are burning cars outside the building."

A police source at the scene told Al Jazeera that the attack apparently started when a suicide car bomb exploded outside the parliament.

OPINION: How to avoid gridlock in Afghanistan

Attackers then continued the attack, firing from a building under construction across the street, the source said.

Police said at least three police officers were injured in the attack, along with others outside the building who could not yet be reached.

Local news organisations reported that at least six explosions were heard in the vicinity of the parliament.

Glasse, who was watching parliamentary proceedings on TV at the time of the attack, said that the parliamentary speaker was at the podium when the video camera started to shake.

"We heard two loud explosions and people nearby heard gunfire," she said, adding that the politicians evacuated from the parliament.

"Right now, the parliament is empty and full of smoke."

Monday's session of parliament was well attended because the defence minister nominee was to be introduced by the second vice president. Neither was in the building at the time of the attack.

Members of parliament were evacuated to safety.

The Taliban has been on the offensive across the country in recent weeks - taking control of districts in northern Kunduz province and staging attacks in southern Helmand province.