A Border Patrol agent shot and killed a woman who had crossed the border illegally near Laredo, Tex., on Wednesday after the officer came under attack, federal authorities said.

The officer was searching for “illegal activity” in a culvert on a residential street in Rio Bravo, a border town about seven miles south of Laredo, when a group of undocumented immigrants started to hit him with “blunt objects,” United States Customs and Border Protection said. The officer, whose name was not released, fired at least one shot with his handgun, fatally striking the woman in the head.

A woman who lives next door to the site of the shooting disputed the federal agency’s account of the events, saying that the property does not have a culvert and that she did not see any weapons that the group could have used.

“They were on the very corner on that lot where there was a tree,” the woman, Marta V. Martinez, said in an interview Thursday morning. “There was no weapon. They were hiding.”