From the Metropolitan Police Web Site
Section 21 of the Firearms Act (extract on 'prohibited persons')
A person who has been sentenced to preventive detention or to imprisonment or to corrective training for a term of three years or more; or who has been sentenced to be detained in a young offenders' institution in Scotland, shall not, at any time, have a firearm or ammunition in his possession.
This means for life and includes all firearms, even air weapons.
A person who has been sentenced to borstal training, to corrective training for less than three years, or to imprisonment for a term of three months or more, but less than three years; or who has been sentenced to be detained for such a term in a detention centre or in a young offenders' institution in Scotland, shall not at any time before the expiration of a period of five years, from the date of his release, have a firearm or ammunition in his possession.
It is also an offence for a person to sell or transfer a firearm or ammunition to, or repair, test or prove a firearm or ammunition for, a person whom he knows or has reasonable grounds for believing to be prohibited from having a firearm or ammunition in his possession.