At its height 15 fire engines and 80 firefighters were involved in tackling the early hours blaze which ripped through the refurbished mill complex in Rebecca Street, Bradford, back in December 2017.
A court heard today that Hamza Nadeem, who was then aged 18, had told a worker at the hostel where he was living that he was going to set a fire to tyres which were being stored in the basement of the premises because he was "p***** off" with a firm of solicitors who had an office in the building.
The hostel worker contacted the police when he later saw media coverage of the huge blaze and last June the now 19-year-old was found guilty of arson by a jury at Bradford Crown Court.
Two teenagers in hospital after crashed motorbike sets on fire on Leeds street
Caught on camera Leeds: West Yorkshire Police need to speak to these people urgently
Leeds Olympian Nicola Adams and girlfriend Ella Baig reveal baby boy's name as they talk about parenthood
How to see Lancaster bomber and Spitfire flypasts near Leeds at Yorkshire Wartime Village
Met Office storm warning for Leeds - when the stormy weather is due to hit and how long it will last
Prosecutor Glenn Parsons told a judge today that Nadeem, who was diagnosed with autism at the age of seven, had spoken about his fascination with fire and had footage on his mobile phone from other fires.
The court heard that Nadeem suffered from "cognitive impairments" and his barrister Simeon Evans said the teenager had clearly not had the assistance needed.
-> Police seize cocaine, MDMA and ketamine from suspected dealer's car in LeedsMr Evans said there was no evidence that Nadeem had started the fires captured on his mobile phone and he suggested that the teenager's interest was in fire engines and the response to fires.
He pointed out that the solicitors had said that Nadeem had never been on their books and any idea of a vendetta was entirely fanciful.
Recorder Simon Eckersley said Nadeem, who was locked up for four years with an extended licence period of four years, had deliberately targeted the mill for whatever reason and the fire had been devastating.
"The damage caused was substantial," he told Nadeem.
"Not just to the building itself but no doubt to the various businesses based there. At its height a total of 15 fire engines and 80 firefighters were required to fight the fire and the cost of the repairs alone was some half a million pounds."
-> Body found in Yarm river in search for 22-year-old Luke Jobson who went missing after night outThe judge noted that Nadeem's mother had expressed concern about his "obsession with fire and firestarting" as long ago as 2007 and the teenager himself had reported setting fires previously.
Recorder Eckersley said there was evidence of a long-standing fascination with fire and the court had taken note of Nadeem's filming of fires and his "excitement and enjoyment" in witnessing both the fires themselves and the aftermath.
He concluded that the teenager, who had no previous convictions, posed a significant risk under the dangerous offender legislation and an extended sentence was necessary to protect the public in the future.