John Glenn was famous for his trips to space, but the Elwood school district is embracing his legacy on Long Island.

Glenn, the first American to orbit Earth, has been the district high school’s namesake since November 1962, when the new building was christened John H. Glenn High School.

After the death of the former astronaut and U.S. senator Thursday, the district posted a message online.

“We recognize Glenn’s great contributions to the country and are honored to have a building bearing his name,” the message said. “We hope our students, both present and future, uphold the values of perseverance, determination and hard work that Glenn embodied.”

District Superintendent Kenneth Bossert said the school board had a moment of silence at their monthly meeting Thursday night.

Glenn, a native Ohioan, died in Columbus at 95 after being hospitalized last week. The former Marine was idolized for his achievements in space as a member of the original Mercury astronauts.

advertisement | advertise on newsday

Elwood school district officials told Newsday in 1962 that they based their decision to name the school after him on Glenn’s historic orbit around the globe, which took place in February that year.

Officials flouted a state board of education decision that the district was too small for a high school, opting to build it anyway. The district figured the state wouldn’t deny funds for a school named after a hero like Glenn — and they were right.

“People everywhere, particularly children, need models and ideals to stimulate them to great achievements,” said then-school board President Willard Adams. “Glenn has become a symbol of patriotism, valor, strength and philosophy, symbols which have inspired our nation since its beginning.”

Glenn was not able to attend the dedication but sent the school gifts: a framed photo of the Mercury Atlas on the launchpad, a photo of himself and a copy of a government manual detailing the results of his mission.

In October 1998, when Glenn returned to space as a 77-year-old, classes were let out early so students and their families could watch the liftoff.

Today, the school, now known as Elwood-John H. Glenn High School, has more than 800 students.