Washington(CNN) US troops helped Somalia's security forces rescue approximately 30 child conscript soldiers Thursday during a raid on an al-Shabaab camp, a US military official tells CNN.

The team of US Special Operations Forces was advising local Somali troops during the raid on the militant camp in the Middle Shabelle region of Somalia, the official added.

The US military also carried out an airstrike against al-Shabaab militants Thursday, "killing four terrorists," approximately 50 kilometers (about 30 miles) northwest of Kismayo, according to a statement from US Africa Command, which oversees US troops in the region.

"US forces will continue to use all authorized and appropriate measures to protect US citizens and to disable terrorist threats," the statement added.

Al-Shabaab is al Qaeda's affiliate in Somalia. The US has carried out over 30 airstrikes against the terror group since President Donald Trump granted the military the authority to target al-Shabaab in 2017.

The US has about 500 troops in Somalia including Special Operations Forces working as military advisers and conventional logistics personnel. US Navy SEALs are often deployed to serve as advisers to Somali security forces.

Earlier this week US troops accompanied Somali forces during a patrol in Baar and Sunguuni, Somalia, as part of an effort to "further establish Somali National Security Forces presence in the region and deter al-Shabaab from conducting terrorist activities against the Somali people," US Africa Command told CNN.

The US recently suspended some aid to Somalia's security forces over concerns about corruption, however the US continues to provide aid to those Somali units that are advised by American military personnel.