Israeli police said Thursday that security guards at a checkpoint near Jerusalem were in "immediate danger" when they shot and killed a Palestinian woman carrying a knife, after a widely circulated video of the shooting raised concerns about excessive force.

The video of the shooting early Wednesday appears to show a private security guard firing at the woman from several meters (yards) away at the Qalandia checkpoint, just outside Jerusalem. The woman drops what appears to be a knife before falling to the ground. Three other armed guards move in and one of them kicks the knife away. The woman crawls a short distance before lying motionless.

Palestinians have carried out dozens of stabbing attacks against Israeli security forces and civilians in recent years. But human rights groups say Israeli forces often use excessive force, opening fire when suspects could have been disarmed and detained through non-lethal means.

There have also been cases in which distraught Palestinians appear to have deliberately ended their lives by attacking Israelis, a variation of the "suicide by cop" phenomenon.

Police spokesman Micky Rosenfeld said the woman was armed with a knife and walking in an area reserved for vehicles.

"She shouldn't have been there in the first place, which shows clearly that she had intentions of carrying out an attack," he said. The security guards "made a decision at a time when they were in immediate danger and they opened fire according to the danger, the life-threatening situation."

The woman has not been identified. Rosenfeld said she was not carrying an ID, which is required for those passing through the checkpoint on the main road from Ramallah, the city in the occupied West Bank where the Palestinian Authority is headquartered, to Jerusalem.

She was taken to a hospital for treatment and later died of her wounds, police said. In its initial statement after the attack, the police said the woman had been shot in the leg.

Mohammed Jaradat, who said he witnessed the shooting as he was waiting in a vehicle at the checkpoint, said the woman approached the security guards as they were inspecting a bus. He said the guards shouted at her in Arabic to go back but the woman froze in place, and then one of the guards shot her.

"He could have easily arrested her," he said.

The Israeli human rights group B'Tselem said it was still investigating the incident, but that it appeared to resemble past instances in which Israel used excessive force.

"What is clear is that such an incident should not have ended with a fatality," B'Tselem spokesman Amit Gilutz told The Associated Press. "In many similar past incidents, in which Palestinians have either attempted to stab Israelis or it was claimed they made such attempts, lethal force was used against them when there was no justification for it, and as a first, go-to means."

Associated Press writer Mohammed Daraghmeh in Ramallah, West Bank, contributed.