The two American officers were sitting in a small room that has no security cameras and is close to the coordination center. But Mr. Saboor was recorded by other cameras in the building, said Sediq Sediqi, the Interior Ministry spokesman. He apparently entered the room where the officers were sitting and shot them in the head; the pistol used to kill them was equipped with a silencer, two of the Afghan officials said.

After the shootings, Mr. Saboor was apparently able to leave the ministry without complications, the officials said, suggesting to some that he might have had help. He had behaved oddly in recent months, two officials said, and about five months ago he was fired after prolonged absences. But he was later reinstated for reasons that were not clear.

Afghan officials acknowledged that the killings were a serious breach of trust that could undermine the training mission, and they said they were working hard to find the killer.

“We have a search operation under way in every part of Afghanistan,” said Mr. Sediqi. Another senior ministry official said that the authorities were reasonably sure that Mr. Saboor had not left the country.

Within hours of the killings on Saturday, four Afghan security officials traveled to Mr. Saboor’s home in the area near the 9,000-foot-high Salang pass. They arrived at 10:30 p.m., roused the village elders and went to Mr. Saboor’s house, Maj. Noor Agha, the district police chief, said.

“When we knocked,” Major Agha said, “the mother and the wife opened the door, and they were very afraid and said, ‘We don’t have any man in our house. Why are you here?’ And I told them, ‘Abdul Saboor, your son, had a fight in the ministry and he fled,’ but when we saw the house, they were very poor people and we discussed among ourselves who will care for them for now.”