Somali court-martial has on Monday found guilty, Ahmed Ali AyBakar for acting as a caretaker for al-Shabaab fighters in Mogadishu.
Ay Bakar was arrested by security agencies in Mogadishu from one of the health facilities while aiding an allege al-Shabaab fighter.
He was found guilty by the court for providing shelter for militants including renting houses for them in the capital.
The court has rejected an argument by the suspect lawyer that claimed Mr. Ahmed was forced by the armed group and thus did the action for fear of his life.
Following the examination of all pieces of evidence provided by both sides, Somali military court chair, Colonel. Hassan Nur Shute sentenced the accused to ten years in prison.
The verdict is open for appeal within a period of thirty days if not satisfied with the ruling.
The court which regularly handles terror cases has previously been accused by rights groups for violations against suspects for not providing them a fair trial.