Qoomaal pleaded guilty to two counts of dishonestly failing to notify a change of circumstances regarding Pension Credit and Housing Benefit between August 20, 2013 and February 22, 2016.
Incredibly, Qoomaal, of Archery Close, Harrow, north-west London, continued to receive benefits, minus a £44 per-week deduction to compensate the Department of Work and Pensions (DWP), while his case was pending.
At that rate it would have taken Qoomaal, who has heart and renal issues, 17 years to repay the £38,869.97 total.
He also needed a taxpayer-funded interpreter during eight court hearings.
Isleworth Crown Court Judge Jonathan Ferris asked: “Why does he live here? Why is he entitled to benefits? What’s he doing here?
“He can’t have made much of a contribution to the pension credit he is receiving.”
Prosecutor Miss Lisa Matthews said: “He failed to notify the fact he was living abroad in Somalia and in order to mislead investigators he fabricated an immigration stamp in his passport.”
The court heard Qoomaal wanted to live in a warmer climate for health benefits and only returned to the UK when he heard he was wanted for questioning.
The prosecutor added: “He left the UK on an open ticket and did not return. He gave the keys to his privately-rented flat to a third party, who lived there while he was abroad.”
When quizzed Qoomaal tried to lie his way out of trouble, but finally confessed when his legal representative informed him the evidence was overwhelming.
He is currently on medication and has a series of hospital appointments with departments specialising in cardiology, dialysis and infectious diseases.
His lawyer Miss Mariska Van Leeuwen said: “He also has problems with his legs. He had a heart attack last year and another this year and he has a vast amount of medication with him.”
Qoomaal claimed asylum on the basis he was in danger in his homeland, but this did not prevent his return trip, where he received his benefit money via Western Union transfers from an accomplice.
Judge Ferris asked: “He’s just gone back there, how does that work? He came here as a refugee 15 years ago and then goes back to Somalia to enjoy the nice weather.
“The lawyer pressured me to plead guilty and I did not understand ‘guilty’. I thought it was something that makes you free.”
Judge Ferris told him: “The offences are aggravated by your attempt to avoid responsibility by the false stamp on your British passport.
“You have also made an elaborate and utterly hopeless application to change your plea, which has resulted in at least four additional court hearings.”