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 will probably remember their trip to the capital last week for ad different reason: It was the occasion for a pointed snub of House Speaker Paul D. Ryan, R-Wis.

About half of the roughly 150 students refused to have their photo taken with Ryan when he briefly joined them outside the capitol Thursday. Instead, they stood across the street while Ryan posed with their peers.

Matthew Malespina, 13, 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.

“I don’t want to be associated with a man who puts his party before his country,” Matthew said. “I don’t like to take a picture with somebody that I can’t associate with. Let’s say somebody is not nice to me at school, for example. I wouldn’t take a picture with them, probably.”

Matthew’s mother, Elissa Malespina, said she was surprised but pleased to hear of the students’ protest action.

“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,” she said.

Elissa Malespina said some of the online comments on news stories about the students’ actions have been vitriolic, often focusing on the parents.

“Our community has been supportive of what has happened,” she said. “Outside our area, people have said that they should shoot 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 is unfounded.

Ryan’s office did not respond to requests for comment. On social media, the speaker gave no hints that he was miffed by students refusing to be photographed with him.