Story highlights US forces were advising Somali troops during the raid on the militant camp

The US also carried out an airstrike against al-Shabaab militants Thursday

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.

Read More