Officials and internet providers attributed the problem to a commercial ship that they said cut an undersea cable. The lack of internet service also stranded patients who were seeking medical attention abroad as they couldn't access online paperwork. The fragile central government remains a target for the al-Qaida-linked al-Shabab extremist group, which often carries out deadly attacks in the capital.