According to officials, the militants seized dozens of people hostage. A few minutes before this, a suicide bomber blew himself up in front of a government building in the eastern Afghan city of Jalalabad.
A spokesman for the Nangarhar provincial government, Attaullah Khogyani, told AFP that after the bombing, the militants stormed the camp of urban refugees and returnees.
In hospitals, about ten people with minor injuries were reported. The two are critically injured.
According to the provincial officials, at present there is a skirmish between the security forces and the attackers.
The witness also said that she had heard at least three explosions.
According to another witness, a passerby named Obaydullah, the attack began when a black car with three passengers drove up to the entrance to the building used by the Refugee Department and a gunman fired from it.
One attacker blew himself up at the gate, and two other militants entered the building. A few minutes later the car exploded, injuring people on the street, he said.
One hostage called the security services and told them that the attackers ordered people not to move.