▶ Watch Video: President Biden calls recent gun violence a “national embarrassment” and urges congress to act

Washington — President Biden delivered a surprise message to seniors at Marjory Stoneman Douglas High School in Parkland, Florida, during their graduation Tuesday, praising them for their resilience after enduring a mass shooting that left 17 dead when they were freshmen at the school and a pandemic that roiled their junior and senior years.

“You’ve been tested in ways no young person should ever have to face,” Mr. Biden said in taped remarks from the East Room of the White House to the class of 2021, “from a freshman year, a year of unspeakable loss, to a junior and senior year upended by a pandemic. But the story of this class and the Parkland community isn’t just a story of pain, it’s a story of resilience.”

The president commended the students for “turning pain to purpose, darkness to night,” and said they are part of a rare generation of young people who “come along at a point in history with a chance to make real change.”

“The world has already seen just how capable you are, how strong you are, how resilient you are. There’s no question you’re already changing the world. The 10 who should be with you today are changing the world alongside you as well,” Mr. Biden continued. “It’s presumptuous of me to say this, but I’m so proud of each and every one of you. Because of you, I’ve never been more optimistic about our future than I am today.”

The president joined a star-studded lineup of guests extending virtual congratulations to the students — among them singer Demi Lovato, television host Ellen DeGeneres, former NBA player Dwyane Wade, football player Tim Tebow, singer Harry Styles, actress Jennifer Hudson, and comedians Jimmy Kimmel and Jimmy Fallon.

The graduating seniors were in their first year at Marjory Stoneman Douglas High School in 2018 when Nikolas Cruz, then 19, opened fire in the school, killing 17 students and staff members. Cruz confessed to the killings and faces the death penalty if convicted.

The 2018 shooting sparked a wave of activism from students at the high school, who organized marches nationwide calling for an end to gun violence and stricter gun laws.

Mr. Biden has called gun violence a “national embarrassment” and took unilateral action in April to begin revamping federal gun policy. The president has repeatedly called on Congress to send to his desk two bills approved by the House that would expand background checks on gun sales and pass an assault weapons ban, which expired in 2004.