A Georgia-based soldier who was supporting the training of Afghan security forces was killed during an “apparent insider attack” Saturday, becoming the third U.S. service member to die in Afghanistan this year.

Cpl. Joseph Maciel of South Gate, Calif., died in the Tarin Kowt District, which lies southwest of Kabul. He was assigned to 1st Battalion, 28th Infantry Regiment, 3rd Infantry Division at Fort Benning.

Two other unidentified U.S. troops were injured in the incident and are in stable condition, according to the U.S. Defense Department. The Taliban has claimed an Afghan soldier carried out the attack.

“I can say that we have seen the Taliban’s statement praising the attacker, who they claim was an Afghan soldier,” Lt. Col. Martin O’Donnell, a military spokesman in Kabul, said in an email. “Again, that has yet to be determined as the incident is under investigation.”

News of attack comes as about 2,200 troops from the Georgia National Guard's 48th Brigade are preparing to deploy to Afghanistan in the coming months. The Georgians will train Afghanistan's police and troops in a restive area near the Pakistan border.

Such training is part of the Trump administration’s strategy to prevent Afghanistan from becoming a haven for terrorists like the ones who carried out the Sept. 11 terrorist attacks.

Now in its 17th year, the war in Afghanistan is the longest war in American history. More than 2,100 U.S. troops have died in Afghanistan, according iCasualties.org, an online database.

Maciel’s unit is supporting the 1st Security Force Assistance Brigade, which deployed in March to train Afghan troops. The brigade’s commander, Col. Scott Jackson, told reporters last month that Afghan military leaders have “uniformly said that most important thing to them is the safety of their advisers.”

“I will tell you honestly, we have had our Afghan partners come to us with intelligence that preempted potential attacks, and they have been proactively taking care of their own problems,” Jackson said.

“They understand, culturally and, honestly, militarily, the value of our safety,” he added. “It’s ingrained in their hospitality — in their culture of protecting their guests. And we are viewed as guests in their organization.”

Maciel, an infantryman who served in the Army for two years, is survived by his father and mother. His awards and decorations include the Bronze Star, Purple Heart, Army Achievement Medal, and Afghanistan Campaign Medal.

“Cpl. Maciel was an excellent soldier beloved by his teammates and dedicated to our mission,” said Lt. Col. David Conner, Maciel’s battalion commander. “Our prayers are with his family and friends during this difficult time.”