As workers extracted wooden beams from a former cotton mill in the US, little did they know the difference they would make to a historic venue 3000 miles away.

While they went about clearing out the building in Lowell, Massachusetts, a team in Scotland was desperately searching for yellow pine timber to help restore Glasgow School of Art.

It was the victim of a devastating fire in May 2014 just as students were preparing for their degree show.

The blaze ripped through the west wing of the 108-year-old building and destroyed the Mackintosh library, thought to be one of the finest examples of art nouveau in the world.

The Japanese-inspired Studio 58 above the library was also lost in the flames.

Priceless furnishings and fittings were destroyed and many students' artworks, which they had worked tirelessly on, had been reduced to ash.

A painstaking process of clearing the debris began and restoration work finally started two years after the fire took place.

The team behind the work was determined to recreate as much of Charles Rennie Mackintosh's original design as possible.

"The commitment from the word go that we would do this and we would do it sensitively to Mackintosh's design," explains Lesley Booth from Glasgow School of Art.

"What we've done is gone back to the original documentation and where possible source materials which match that documentation."

The discovery of the southern yellow pine timber across the Atlantic, the same wood used as upright beams in studio 58, was perfect.

"It was really important for us to source materials that were appropriate," Lesley says.

"The original material in the building had come from Massachusetts so obviously we went back to Massachusetts to look for something to replace it.

"What was particularly exciting was that this material had been salvaged from a building that had been constructed pretty much at the same time in Massachusetts that the Mackintosh building was being constructed in Glasgow."

The eight 23ft wooden beams were removed from a section of the Picker Building, one of the last structures built as part of the historic Massachusetts Cotton Mills complex, as the structure was turned into homes.

The same beams would be repurposed in Studio 58 to recreate Mackintosh's original Japanese-inspired concept.

Loaded on to a shipping container late last year, they arrived in Scotland at the beginning of 2017.

After testing and shaping the wood in a workshop in Glasgow, the beams were craned into the Mackintosh building and manoeuvred into place in a delicate and complex operation.

"Longleaf Lumber are truly excited and humbled to be part of such a tremendous restoration project," a spokesperson for the American company said.

"It is fitting that these beams, cut from the grand longleaf pine forests and originally milled for a factory in the birthplace of the American industrial revolution, have been reclaimed and repurposed in a restoration effort that pays homage to an architectural master who was influenced both by nature and the industrial changes of his time."

Loading the beams has helped to move the restoration project forward, with Lesley adding the team is looking to the US again to source more materials to bring Glasgow School of Art back to life.

"We're trying to source tulip wood for elsewhere in the building which will also come from America because there was originally tulip wood used from North America used in the building," she says.

"In each area of the restoration, [we are] sourcing materials and using craftsmanship that are of the same quality and calibre of the original building."

The temporary structure covering the restored west wing roof is planned to be removed soon and it is hoped the first students will return to the building in September 2019.