Nhengu, along with her mother and two brothers, faced deportation in February, but were granted leave to remain in Britain after appealing against the Home Office's original ruling.
Now, the Home Office has failed in its own appeal to overturn the decision not to deport the Zimbabwe-born family
The Nhengu family lawyer said in a statement: "This has come after such a long ordeal. The Home Office has a last resort appeal right to the Court of Session, but I hope they respect the judgement made today.
"My client has been granted leave to remain in the UK so now she and her family are able to get on with their lives and put this behind them."
A UK Borders Agency spokesman commented: "We are disappointed with the court's decision in this case and will be looking closely at the judgement.
"The UK Border Agency considers every case carefully and where we do not believe someone has the right to stay in the country, and they do not require our protection, we expect them to return home."
Singer Gamu, now 19, was controversially axed from last year's X Factor series by mentor Cheryl Cole.
> Simon Cowell rehashes Gamu's 'Walking on Sunshine' on X Factor USA