Zimbabwean born Wilfred Maushe, aged 23, had been supplied with a false passport by his mother and it bore a stamp which claimed he was allowed to stay in the country indefinitely, said Mr Lal Amarasinghe prosecuting.
He told Wolverhampton Crown Court the forged document was found by immigration officials when they raided the house where Maushe lived in Hagley Road West.
Maushe arrived in Britain in June 2003 and attended schools in Birmingham before claiming political asylum in March this year, said Mr Amarasinghe.
The application was rejected by the Home Office last month and when officials swooped on his home a short time later, they found the false documentation.
Mr Amarasinghe said: "The passport was endorsed with a bogus stamp that said he had been granted indefinite leave to stay in this country."
Maushe admitted possessing the false documentation and was told by Judge John Wait the outcome of an appeal against his deportation would be known by the time he had completed his time behind bars.
Miss Sarah Jayne-Buckingham defending told the court Maushe left Zimbabwe after being put under pressure to join a youth militia that supported Robert Mugabe.
She said: "If he had stayed there it would have been a question of either being compelled to join or face torture and possible death."