Dozens were injured in both terrorist acts, claimed by the armed group Al-Shabaab, which is particularly active in Eastern Africa.
In Kenya, attack followed the kidnapping of three Kenyan police reservists in Wajir County on Friday.
UN chief Guterres expressed solidarity and “his deepest condolences to the families of those killed and to the Governments and people of Kenya and Somalia” and he wished “a quick recovery to the injured”.