Somalia is what some call a failed state. The government can't govern and largely subsists on UN and US handouts.
Take the troops out of Afghanistan ans put them in Somalia.
It wouldn't be an easy job; Somalia has a very long coastline, curling around the horn of Africa.