Army Cpl. Joseph Maciel from South Gate, California, was killed over the weekend in southern Afghanistan by an Afghan soldier in an apparent “green-on-blue” attack as he was protecting his fellow soldiers.

His death on Saturday marks the third U.S. military death in Afghanistan this year. He was 20 years old.

Maciel served with the 1st Battalion, 28th Infantry Regiment, 3rd Infantry Division in Fort Benning, Georgia, but attached to the 1st Security Force Assistance Brigade (SFAB) as a member of a security force element.

The 1st SFAB deployed to Afghanistan in February to provide hands-on training and assistance to Afghan forces.

“Cpl. Maciel was an infantryman assigned to [Task Force] 1-28 Infantry, 3rd Infantry Division and attached to the 1st SFAB as a member of our security force element. In that role, he was selflessly protecting others when he was killed,” read a statement on the 1st SFAB’s Facebook page.

“On behalf of the 1st SFAB, we extend our heartfelt thoughts and prayers to Cpl. Maciel’s Family during this very difficult time. We are incredibly proud of Cpl. Maciel’s selfless service to his fellow Soldiers and our Nation and deeply saddened by his loss. We will never forget him or his ultimate sacrifice,” Army Col. Scott Jackson, commander of the 1st SFAB.

“Cpl. Maciel was an excellent soldier beloved by his teammates and dedicated to our mission. He will be greatly missed by the entire Black Lion family. Our prayers are with his family and friends during this difficult time,” said Army Lt. Col. David Conner, commander of Maciel’s battalion.

An Afghan man also posted: “Maciel you are gone and you took my heart with you. I do convey my sincerest condolences to his family and it saddens me a lot that I lost a brother in Arms. I could not do anything other than ran (sic) around to rescue you, but it was too late. My brother RIP and may god give your family the courage to tolerate this valuable loss. Salute.”

Other posts showed the 1st SFAB showing Afghan troops how to clear improvised explosive devices (IEDs), or bombs, and training Afghan troops on basic marksmanship “Shona ba Shona” — or “shoulder-to-shoulder.”

The attack occurred in the district of Tarin Kot, in Uruzgan Province, in southeastern Afghanistan.

The district was once pacified by NATO forces, but as the troop presence drew down, Taliban forces moved back in, turning it once again into a contested battlefield.

Militants are “actively operating” in a number of Uruzgan’s districts, including Tarin Kot, according to Khaama Press News Agency in May. The Afghan Air Force carried out strikes there in May, killing at least nine Taliban insurgents and wounding 12, the Afghan news outlet reported on May 1.

Two other U.S. service members from his unit were wounded in the attack on Saturday. The attack is under investigation, and defense officials on Monday could not say anything more than what has been publicly released.

His unit’s Facebook page posted a note on Sunday:

Our Task Force suffered a terrible tragedy yesterday in Afghanistan resulting in the death of one of our Black Lions and the wounding of two others. All families have been notified and there were no other injuries in the attack. Our thoughts and prayers are with CPL Maciel and his Family during this time of grief. As with any combat-related death, this incident is under investigation and details will not be discussed in order to preserve the integrity of the investigation. I ask that you refrain from speculating as to how, when, or why this occurred. The Black Lion team has been fully engaged with the Families effected and will support in any way possible. Please respect their privacy during this difficult time. The Black Lion team, along with the Chain of Command of the entire 3rd Infantry Division and Fort Benning Community remain committed to our Soldiers and their Families here and abroad. There is no greater priority. Black Lions!

Maciel served in the Army for two years, and Fort Benning was his first assignment. His decorations included the Army Achievement Medal, National Defense Service Medal, and Army Service Ribbon.