Updated

Newtown held a moment of silence and flags were flying at half-staff across Connecticut Wednesday to mark four years after the Sandy Hook Elementary School shooting.

It was Dec. 14, 2012, when 20 children and six educators were killed by a troubled 20-year-old gunman who shot his way into the Connecticut schoolhouse. Adam Lanza shot and killed his mother before driving to the school, and then killed himself after the rampage.

The town typically does not hold an official memorial event on the anniversary, but prayer services were planned for Wednesday and a counseling center was open for extended hours.

School Shooting The First Year

A school bus drives past a lamppost decorated for the holidays, and a sign reading Welcome to Sandy Hook, in Newtown, Conn. (AP)

First Selectman Pat Llodra asked town employees to refrain from doing any work, including answering phones, between 9:30 a.m. and 9:45 a.m. to mark the time when the shootings took place.

President Obama wrote in a Facebook post: "Two days after that horror, I traveled to Sandy Hook to tell the people of Newtown that they were not alone - that we shared their grief, that they inspired us, and that for them, we would try to change. That's all still true. We still share their grief. We're still inspired by the survivors and the families who have worked to make a difference. And we've tried to change."

The Associated Press contributed to this report.