After a raucous campaign rally in New Hampshire, President Trump on Monday took an unannounced trip to Dover Air Force Base to take part in a somber “dignified transfer ceremony” for two 28-year-old soldiers killed in Afghanistan.

After a brief prayer inside a C-17 transport plane, the president and Vice President Mike Pence stood at attention in a light rain as two U.S. flag-draped transfer cases were carried down the plane’s ramp by six members of the military wearing white gloves. The cases contained the remains of Sgt. 1st Class Antonio R. Rodriguez, of Las Cruces, New Mexico, and Sgt. 1st Class Javier J. Gutierrez, of San Antonio, Texas, who both died Saturday in a firefight in Nangarhar Province.

Also attending the ceremony were people traveling with the president, including daughter Ivanka Trump and her husband Jared Kushner, National Security Adviser Robert O’Brien, Kentucky Sen. Rand Paul, House Minority Leader Kevin McCarthy and Florida Rep. Matt Gaetz.

“These were fallen heroes and we were close by and the president wrapped his rally early so he could come,” O’Brien told the press on board Air Force One.

Also in attendance were James C. McConville, Chief of Staff of the Army, SGM Michael Grinston, Sergeant Major of the Army, Maj. Gen. John Brennan, commander of 1st Special Forces Command, CSM Tomas Sandoval, Command Sergeant Major, 1st Special Forces Command, and Col. Matthew Jones, 436th Airlift Wing Commander, among others.

The scene was emotional. Eli Stokols, a reporter for the Los Angeles Times, was in the media pool for the event and filed this in a report to other journalists:

At 11:03 in a light rain, the marshaler directed the vehicle with the family members of both transfers onto the tarmac and it pulled to a stop. One family member broke away toward the C-17 carrying the two transfers and was wailing as other family members and a soldier gathered her on the bottom of the rear ramp. A few moments later once the family members were beneath a canopy, the Army carry team emerged from our right and walked behind the transfer vehicle up the ramp into the rear of the C-17 aircraft. VPOTUS and POTUS followed. After a prayer inside the aircraft out of our view, VPOTUS and POTUS walked out and stood at attention. When the carry team brought the first flag-draped transfer, SFC Javier J. Gutierrez, down to the tarmac, they saluted as the six white gloved members of the carry team walked past with the flag-draped remains and loaded it into the waiting vehicle. Then, the same carry team did an about face and walked back up into the C-17. After another short prayer, they came out carrying the second flag-draped transfer, SFC Antonio R. Rodriguez, again passing VPOTUS and POTUS, who stood at attention, both saluting with their right hands. When both transfers were loaded, the back doors of the vehicle were closed and the van drove away. As the carry team and official party walked past the family, POTUS gave a low thumbs up, pumping his right fist below his waist as they walked out of view at 11:31.

The White House said it was the first time since 2009 that the president and vice president have attended a dignified transfer together.

O’Brien also said dignified transfer ceremonies and Trump’s visits to wounded veterans at Walter Reed National Military Medical Center in Maryland are the “toughest” duty of being president.

After the ceremony, Trump wrote on Twitter: “Just returned to White House from Dover. Very sad!”