KABUL — U.S. Army Spec. James A. Slape stepped out of his vehicle in Afghanistan on Thursday ready to help others. The soldier, trained in bomb removal, wanted to clear a path to a vehicle that had just hit a roadside bomb in Helmand province. Then a second explosion hit, U.S. military officials said.

Slape, 23, became the seventh U.S. service member killed in combat in Afghanistan this year. The Pentagon released his name Friday night in Washington. The Pentagon said he was a member of the North Carolina Army National Guard’s 430th Explosive Ordnance Company and had trained as an explosive ordnance disposal technician. He has been posthumously promoted to sergeant.

“We are deeply saddened by the news of Sgt. James Slape losing his life while serving our country,” said Maj. Gen. Greg Lusk, the adjutant general of the North Carolina National Guard. “We honor his courage, his selfless service, and we extend our deepest sympathy to his family, friends and fellow soldiers as we hold them firmly in our hearts and prayers during this difficult time.”

A spokeswoman for the U.S. military in Afghanistan, Sgt. 1st Class Debra Richardson, said Slape was based in Afghanistan at Camp Dwyer, an installation in Helmand province’s Garmser district. The U.S. military has used it to assist Afghan forces in a region of the country where the Taliban controls broad swaths of territory and where the Afghan military and police have suffered heavy casualties and are often shorthanded.

“The soldier was medically evacuated to a medical care facility, but despite valiant efforts to save him, his wounds were fatal,” Richardson said.

Slape’s unit deployed to Afghanistan in April and is scheduled to return in spring 2019, said Lt. Col. Matthew DeVivo, a North Carolina National Guard spokesman. The Slape family has asked that the media not contact them at this time, DeVivo said.

U.S. military fatalities in Afghanistan are orders of magnitude lower than at the height of American operations there in 2010 and 2011, when more than 100,000 U.S. troops were spread across the country and patrolling cities and countryside daily. However, there are still more than 14,000 U.S. service members in Afghanistan. President Trump increased the U.S. presence to that number from about 8,400 troops last summer, and he said he will withdraw them as the conditions there merit.

Slape’s was the first combat death in Afghanistan since Sept. 3, when Command Sgt. Maj. Timothy Bolyard, 42, was killed in an apparent insider attack by an Afghan he was training in Logar province. Bolyard was the senior enlisted soldier in a squadron of the 1st Security Force Assistance Brigade, a new adviser unit that deployed as part of the Trump administration’s increase in forces this year.

Other deaths involving hostilities include those of Staff Sgt. Reymund Transfiguracion, 36, of the 1st Special Forces Group; Sgt. 1st Class Christopher Celiz, 32, of the 75th Ranger Regiment; Cpl. Joseph Maciel, 20, a member of the 28th Infantry Regiment providing security to the Army’s adviser brigade; Spec. Gabriel Conde, 22, a member of the 25th Infantry Division who was providing security to a Special Operations unit, and Sgt. 1st Class Mihail Golin, 34, of the 10th Special Forces Group.

Staff Sgt. Diobanjo S. Sanagustin, 32, also died Sept. 4 in an incident at Bagram Airfield that the military determined was “nonhostile” in nature.

This story was initially published Thursday after Slape’s death, when his identity was not yet released, and was updated Friday night after the Pentagon identified him.