For students across the country, the traditional eighth-grade trip to Washington is a chance to join the throngs on the Mall and perhaps spot some of the world’s most powerful people on the grounds of the U.S. Capitol.

But a group from South Orange Middle School in New Jersey may remember their trip to the nation’s capital last week for another reason: It was the occasion for a pointed snub of House Speaker Paul D. Ryan (R-Wis.).

Dozens of the 218 students on the trip refused to have their photo taken with Ryan when he briefly joined them outside the capitol Thursday, students on the trip said. Those present were unable to provide a precise tally of how many opted out.

Eighth-grader Matthew Malespina, from South Orange Middle School in New Jersey, joined some of his classmates in declining to take a photograph with House Speaker Paul D. Ryan (R-Wis.) during a visit to the U.S. Capitol on Thursday. (Family photo)

Matthew Malespina, one of the students who stayed away, said in an interview Sunday that he chose not to be photographed with Ryan because he disagreed with the policies the speaker and his party are pushing on health care, among other things. He called Ryan “a man who puts his party before his country.”

He said he and the others stood across the street while Ryan posed with their peers. Their act of civil disobedience was picked up by a local news website, the Village Green, and drew attention from larger media outlets.

“I don’t like to take a picture with somebody that I can’t associate with,” Matthew, 13, told The Washington Post. “Let’s say somebody is not nice to me at school, for example. I wouldn’t take a picture with them, probably.”

House Speaker Paul D. Ryan (R-Wis.) speaks at a news conference Thursday on Capitol Hill in Washington. (Andrew Harnik/AP)

Sophia Kraiker, 14, another student who declined to be in the photo, told The Post that she wanted to distance herself from Ryan because he is “shadowing Trump’s ideas.”

Asked about the incident Sunday, a spokesman for Ryan said the speaker “always appreciates the opportunity to welcome students to the Capitol.” Ryan posted a picture of himself on Instagram on Friday giving a fist-bump to one of the students in the group who agreed to pose.

Matthew’s mother, Elissa Malespina, a public-school librarian who was not on the trip, said she was surprised but pleased to hear of the students’ protest action. She posted about it on her Facebook page.

“I’m proud of him, and I’m proud of the other students that chose to exercise their constitutional rights and did so in a respectful manner,” Malespina said Sunday.

Although little blowback has come their way in the liberal suburb of South Orange, N.J., Malespina said some of the online comments on news stories about the students’ actions have been vitriolic, often focusing on the parents.

She said that while politics are a frequent topic of discussion in their household, criticism that she or other parents “indoctrinated” the kids involved is unfounded. “Teenagers, honestly, do they listen to their parents anyway?”