Eighteen children were killed on Friday morning in a shooting at an elementary school in Newtown, Conn., about 65 miles northeast of New York City, according to a person who had been briefed on the shooting. Another law enforcement official said preliminary reports suggested there could be as many as 20 fatalities, ranking it among the worst mass killings in United States history.

One state official said that an adult gunman was believed to be dead in the shooting at Sandy Hook Elementary School. The gunman was in possession of at least two firearms, the official said. There was some speculation that there were two gunmen involved in the mass shooting.

A 9-year-old boy who is a student at the school said he was in the gym when the shooting erupted.

“We were in the gym, and I heard really loud bangs,'’ said the boy, as he stood shivering and weeping outside the school with his father’s draped around him. “We thought that someone was knocking something over. And we heard yelling and we heard gunshots. We heard lots of gunshots. We heard someone say, ‘Put your hands up.’ I heard, ‘Ddon’t shoot.’ We had to go into the closet in the gym. Then someone came and told us to run down the hallway. There were police at every door, there were lots of people crying and screaming.'’

Another student at the school told an NBC affiliate in Connecticut: “I was in the gym and I heard like seven loud booms, and the gym teachers told us to go in the corner and we huddled. We all heard these booming noises, and we started crying. So the gym teachers told us to go into the office where no one could find us. Then a police officer told us to run outside.”

State police said the Newtown police called them shortly after 9:30 a.m., according to Lieutenant J. Paul Vance of the Connecticut State Police. “On and offduty troopers responded to the school and with Newtown police immediately upon arrival entered the school and began an active shooter search,'’ Lieutenant Vance said.

Meredith Artley, the managing editor of CNN.com, has a friend who works at the school. “She volunteers with the school as well,” Ms. Artley said on CNN.

The woman was in close vicinity to the shooting, which happened in the hallway, according to Ms. Artley. “She described it as a ‘Pop, pop, pop,'” Ms. Artley added. “She said three people went out into the hall and only one person came back, the vice principal, she said, who was shot in the leg or the foot, who came crawling back. She cowered under the table and called 911. She never saw the shooting. There must have been a hundred rounds.”

President Obama was briefed on the shooting at 10:30 a.m., the White House said.

Danbury Hospital said it was treating three patients from the shooting scene, according to its Facebook page. The hospital, which is not far from the elementary school, said it was on lockdown.

At Danbury hospital, stunned-looking personnel in white coats looked shaken as they gathered in small groups talking about the shooting. In a corner near the gift shop, one woman comforted a weeping colleague.

In the coffee shop, a few customers finished their sandwiches at the lunch counter and the cashier wiped tears from her eyes as she rang up customers.

In a mostly empty fifth floor waiting room, three women watched local coverage of the tragedy, shaking their heads at each new horrifying detail.

Gov. Dannel P. Malloy arrived at the scene of the shooting on Friday afternoon.

The school, located among wooded hills and suburban tracts in Fairfield County, 12 miles east of Danbury, serves kindergarten through fourth grade. The school has about 700 students.

“It’s just a liittle country school,'’ said Robert Place, 65, as he stood near the scene. “The look is very 50s or 60s. One floor. It’s always had a good reputation. People come to Newtown for the schools.'’

The school’s principal, Dawn Hochsprung, was reportedly one of those shot. But at the home of her daughter Cristina Hassinger, in Oakville, Conn., the family was still awaiting any news of her fate.

“We’re looking for any hope,” said Ryan Hassinger, the son-in-law of the principal. “If she’s in the hospital, any chance is better.”

He said that his wife, Cristina, 28, and “her sister are there now,” with Connecticut State Troopers, and that he and other relatives were awaiting word on any news.

“I looked on Twitter and it says that she is passed,” said Mr. Hassinger. But, he added, the family was, “just waiting.”

A photograph published by a local newspaper, The Newtown Bee, showed a line of children being escorted out of the school with some of the children crying.

Next door to the school in front of a senior center, a 20-year-old woman was with her 4-year-old sister who was in the school at the time of the shooting. The older woman cam to pick up her younger sister along with their mother. The four-year-old girl had her arms and legs wrapped around her older sister.

When a reporter asked the 20-year-old woman what the little girl knew of what had happened, the woman said, “Absolutely nothing, and we don’t plan to tell her anything.”

Eighteen children were killed on Friday morning in a shooting at an elementary school in Newtown, Conn., about 65 miles northeast of New York City, according to a person who had been briefed on the shooting. Another law enforcement official said preliminary reports suggested there could be as many as 20 fatalities, ranking it among the worst mass killings in United States history.

One state official said that an adult gunman was believed to be dead in the shooting at Sandy Hook Elementary School. The gunman was in possession of at least two firearms, the official said. There was some speculation that there were two gunmen involved in the mass shooting.

A 9-year-old boy who is a student at the school said he was in the gym when the shooting erupted.

“We were in the gym, and I heard really loud bangs,'’ said the boy, as he stood shivering and weeping outside the school with his father’s draped around him. “We thought that someone was knocking something over. And we heard yelling and we heard gunshots. We heard lots of gunshots. We heard someone say, ‘Put your hands up.’ I heard, ‘Ddon’t shoot.’ We had to go into the closet in the gym. Then someone came and told us to run down the hallway. There were police at every door, there were lots of people crying and screaming.'’

Another student at the school told an NBC affiliate in Connecticut: “I was in the gym and I heard like seven loud booms, and the gym teachers told us to go in the corner and we huddled. We all heard these booming noises, and we started crying. So the gym teachers told us to go into the office where no one could find us. Then a police officer told us to run outside.”

State police said the Newtown police called them shortly after 9:30 a.m., according to Lieutenant J. Paul Vance of the Connecticut State Police. “On and offduty troopers responded to the school and with Newtown police immediately upon arrival entered the school and began an active shooter search,'’ Lieutenant Vance said.

Meredith Artley, the managing editor of CNN.com, has a friend who works at the school. “She volunteers with the school as well,” Ms. Artley said on CNN.

The woman was in close vicinity to the shooting, which happened in the hallway, according to Ms. Artley. “She described it as a ‘Pop, pop, pop,'” Ms. Artley added. “She said three people went out into the hall and only one person came back, the vice principal, she said, who was shot in the leg or the foot, who came crawling back. She cowered under the table and called 911. She never saw the shooting. There must have been a hundred rounds.”

President Obama was briefed on the shooting at 10:30 a.m., the White House said.

Danbury Hospital said it was treating three patients from the shooting scene, according to its Facebook page. The hospital, which is not far from the elementary school, said it was on lockdown.

At Danbury hospital, stunned-looking personnel in white coats looked shaken as they gathered in small groups talking about the shooting. In a corner near the gift shop, one woman comforted a weeping colleague.

In the coffee shop, a few customers finished their sandwiches at the lunch counter and the cashier wiped tears from her eyes as she rang up customers.

In a mostly empty fifth floor waiting room, three women watched local coverage of the tragedy, shaking their heads at each new horrifying detail.

Gov. Dannel P. Malloy arrived at the scene of the shooting on Friday afternoon.

The school, located among wooded hills and suburban tracts in Fairfield County, 12 miles east of Danbury, serves kindergarten through fourth grade. The school has about 700 students.

“It’s just a liittle country school,'’ said Robert Place, 65, as he stood near the scene. “The look is very 50s or 60s. One floor. It’s always had a good reputation. People come to Newtown for the schools.'’

The school’s principal, Dawn Hochsprung, was reportedly one of those shot. But at the home of her daughter Cristina Hassinger, in Oakville, Conn., the family was still awaiting any news of her fate.

“We’re looking for any hope,” said Ryan Hassinger, the son-in-law of the principal. “If she’s in the hospital, any chance is better.”

He said that his wife, Cristina, 28, and “her sister are there now,” with Connecticut State Troopers, and that he and other relatives were awaiting word on any news.

“I looked on Twitter and it says that she is passed,” said Mr. Hassinger. But, he added, the family was, “just waiting.”

A photograph published by a local newspaper, The Newtown Bee, showed a line of children being escorted out of the school with some of the children crying.

Next door to the school in front of a senior center, a 20-year-old woman was with her 4-year-old sister who was in the school at the time of the shooting. The older woman cam to pick up her younger sister along with their mother. The four-year-old girl had her arms and legs wrapped around her older sister.

When a reporter asked the 20-year-old woman what the little girl knew of what had happened, the woman said, “Absolutely nothing, and we don’t plan to tell her anything.”