SCARBOROUGH — More than 130 Scarborough Middle School students spent the morning at the Maine Veterans’ Home celebrating a new program that brought together two generations to learn from each other.

The school’s Abnaki Team of homeroom classes partnered with residents and staff at the Maine Veterans’ Home to begin weekly visits five months ago. A different small group from the 140-student team would visit the home to socialize with about 20 residents each week.

Students and residents met one-on-one or in small groups to talk, play games, do woodworking projects or play instruments.

A group of veterans visited the middle school last month to talk about Memorial Day, have lunch with students and tour the school.

Today, students put on an enthusiastic talent show for residents, singing songs and teaching new dance moves. The visit ended with a barbecue lunch.

Marcia Shalek, activities supervisor at the home, said the visits put “a smile on everyone’s face.”

“Our veterans are proud to be a part of this endeavor and this is their way of contributing to their community,” she said.

The visits allowed students to learn about history and residents to hear how technology and entertainment have transformed.

“The students have become historians, gathering firsthand information and realizing the freedoms they have today are due to the bravery of these local heroes,” said teacher Kelli Crosby.

Student Sam Jacob, 14, said visiting the home allowed students to learn about veterans in the community.

“It’s good we can respect these people who served our country,” he said.

Organizers plan to continue the program next year.