Lt. J. Paul Vance, a spokesman for the Connecticut State Police, described “a very horrific and difficult scene” at the school, which had 700 students in kindergarten through fourth grade. It had a security protocol that called for doors to be locked during the day and visitors to be checked on a video monitor inside.

“You had to buzz in and out and the whole nine yards,” said a former chairwoman of the Newtown board of education, Lillian Bittman. “When you buzz, you come up on our screen.”

The lock system did not go into effect until 9:30 each morning, according to a letter to parents from the principal, Dawn Hochsprung, that was posted on several news Web sites. The letter was apparently written earlier in the school year.

It was Ms. Hochsprung, who recognized Mr. Lanza because his mother worked at the school, who let him in on Friday. Sometime later, she heard shots and went to see what was going on.