President Trump and Vice President Mike Pence paid tribute to two U.S. soldiers who were killed in Afghanistan.

Trump and Pence flew from New Hampshire, where the president held a campaign rally, to Dover Air Force Base in Delaware late Monday to attend the dignified transfer of Sgt. Javier Jaguar Gutierrez, 28, of San Antonio and Sgt. Antonio Rey Rodriguez, 28, of Las Cruces, New Mexico, according to a pool report.

The two were killed when a soldier dressed in an Afghan army uniform opened fire with a machine gun on Saturday. Six other U.S. soldiers were injured in the attack.

Trump saluted, and Pence placed his hand over his heart as transfer cases containing the remains of the soldiers were carried out of a plane and put in a transport vehicle. As the pair stood on the tarmac, a woman ran toward the plane, crying and screaming. Other mourners and an official tried to restrain her.

National security adviser Robert O’Brien told reporters traveling with Trump on Air Force One that the president ended his rally early so he could pay his respects to the soldiers. He said such moments are “probably the toughest thing he does as president.”

“These are terrible sacrifices for the families. And these guys are heroes, they’re real warriors and did a great job for the American people," O'Brien said. “These are tough times. It’s tough for the president, but he thinks it’s important to be there for the families and recognize them.”

Six U.S. service members have been killed in Afghanistan this year.