Ed Sheeran played with Lego in between making 'Shape of You'.

Snow Patrol's Johnny McDaid has opened up about working on the track, which is Spotify's most streamed song of 2017, with the 26-year-old singer/songwriter, and how he brought the plastic toys with him to the studio because he knows how short the 'Lego House' hitmaker's attention span is.

In an interview with The New York Times, McDaid revealed: ''His attention span can be fairly low.

''One of the things I did to try and keep him in the room while I would be working on a track -- I would have a suitcase full of Lego I'd pull into the hotel room and say, 'There you go, you build that,' and it was great because he would sit and build the Lego and kind of get lost in that world for a second and then come up with this moment that was everything.''

The pair co-wrote the track with Steve Mac, who recently admitted they had no idea how big the track would be, and how they weren't writing the track with Ed in mind.

The 45-year-old producer said: ''Ed, myself and Johnny never even thought it was an Ed Sheeran record - we just thought it was a good little pop song.

''Ed played me what he thought was the first single from 'Divide', which sounded amazing. So we started writing and within the first two hours, 'Shape Of You' came along.

''In our minds we weren't writing for Ed at this stage, which is probably why it sounds like it does.''

Steve also revealed that Atlantic Records label boss Ben Cook advised the trio not to give it away to anyone else, and insisted Ed should have it as his lead single on what would be his record-breaking LP 'Divide'.

He said: ''Ben Cook got very excited and said: 'This should be the single!'

''They heard something different; that's why they're good at their jobs.''