A British teenager has been sentenced to at least eight years in prison for planning a gun-and-bomb attack at his former college.

Liam Lyburd was convicted in July of buying a semi-automatic handgun and ammunition online to carry out a massacre at northern England's Newcastle College, which had expelled him for being disruptive.

A file recovered from his laptop had the words "you people ruined my whole life, don't expect me to show mercy today."

Lyburd was arrested in November after a Facebook contact grew alarmed by his social-media posts and contacted police.

Judge Paul Sloan sentenced 19-year-old Lyburd on Friday to life with no chance of parole for eight years. The judge said "it was only a matter of time before you would have put your plan into action."