SACO — In a surprise ceremony, eighth-grade science teacher Michaela Lamarre was shocked Thursday to learn she had won $25,000 and the Milken Educator Award.

Lamarre, who teaches at Saco Middle School, was one of 40 teachers nationwide to win this year’s award. It is given to “unsung hero” teachers, principals and specialists, in the first half of their career, who aren’t necessarily well known beyond their districts.

“We believe educators have the most important job in our country, preparing all of you for a bright future,” Jane Foley, senior vice president of the Milken Educator Awards, told the students assembled in the gym. “Good teachers make the difference.”

Lamarre, who has taught for 12 years, was praised for her teaching style and for helping create an after-school activity to build robots.

Lamarre, who had been told the school assembly was for another reason, said she was in “complete and utter shock” when the award was revealed.

One of her students, 13-year-old Kristina Arabatizs, said she wasn’t surprised at all.

“She’s been one of my favorite teachers,” Arabatizs said. “She’s one of the best teachers and she always puts a smile on your face.”

Lamarre said she would use the money “for STEM (science, technology, engineering and math) programs and my students.”

“I want my students to think and act like scientists. That way, when they go out in the world, they make informed decisions and have the best life possible,” she said.

“(My students) are the most wonderful students in the entire world and I love each and every single one of them.”

More than 2,600 teachers nationwide have received the Milken Educator Awards, funded by the Milken Family Foundation, since 1987. Maine has had 71 award winners.

The last Maine teacher to get the Milken Educator Award was Morgan Cuthbert, a Harrison Middle School teacher in Yarmouth, in 2011.