UNITY, Maine — The mud was deep but the smiles were wide Wednesday as a group of Mount View High School students worked to plant 500 trees and shrubs during their school-wide Community Spirit Day.

The eight sophomores toiled for hours in an old gravel pit that the Maine Organic Farmers and Gardeners Association is working to turn into the Maine Heritage Orchard, planting hazelnuts, cranberries, plums, blueberries, chokeberries, dogwood, witch hazel and more. The terrain looked like a wasteland, but that will change, said Angus Deighan, who works for the orchard.

“Right now this just is a muddy, horrible hole, but the more stuff we have growing here, the nicer it will be,” he said. “We’re reclaiming land that’s been lost.”

That’s thanks in part to the help of the students. All of the high school’s freshmen, sophomores and seniors spent the day working at 19 different locations around the far-flung school district and in neighboring towns while the juniors were taking the SATs.

“I like it,” Chelsea Lydem, 15, of Troy said as she dug a hole to plant a tree. “I actually really wanted to come here. I love this stuff.”

Meanwhile, her classmates Alliy Kennedy, 16, of Unity, Haley LaRochelle, 16, of Brooks and Whitney Ravin, 15, of Brooks looked muddy but happy as they worked a particularly soggy patch of ground.

“It’s awesome,” LaRochelle said. “I like that we plant different types of things.”

“It’s fun smacking each other with mud,” Ravin chimed in with a grin.

Mount View High School Principal Bill Tracy said after the school day was over that he was delighted with the outcome of the day of service. He estimated that about 350 students did work that included building trails, packing food for Meals on Wheels, mentoring younger students and even cleaning out a house that was donated to the food pantry in Jackson.

“It was hard work,” he said, adding that he watched the groups come back to school at the end of the day. “They were dirty. They were dragging. Our teachers were yawning. But they all had smiles on their faces.”

He said that he doesn’t know of another school in the state that has this kind of community-wide day of service. At Mount View High School, community service is a graduation requirement, and the dedicated service day came about because the junior class took the SAT on Wednesday and needed a quiet, calm environment. Administrators considered moving the juniors out of the school complex but figured it would be simpler and more meaningful to have the other students do service projects.

“It is important to help students better understand their role in our community,” said Superintendent Heather Perry of RSU 3, which serves Brooks, Freedom, Jackson, Knox, Liberty, Monroe, Montville, Thorndike, Troy, Unity and Waldo. “What they can do to benefit the community, and vice versa.”

Jason Tessier, the facilities director at the Maine Organic Farmers and Gardeners Association, said having all those willing volunteers in the orchard was great. He said the organization has a contract with the Natural Resources Conservation Service to plant 1,000 trees and shrubs in the old gravel pit.

“They’ll plant 500 today,” he said with an approving look at the students’ handiwork. “They’re doing very well.”