A Scottish composer was "deeply honoured" to write a new anthem for the Queen's historic state funeral. 

As a final farewell was said to Queen Elizabeth in Westminster Abbey on Monday, a composition named 'Who shall separate us' filled the Gothic chamber.

James MacMillan, who wrote the anthem, described the late monarch as a "constant presence" as he praised her ability to speak about her faith with people across a range of beliefs. 

The anthem drew from the "beautiful" text from Romans 8 which he said "cuts straight to the core of the Queen's relationship with Christ". 

He said: "For many she was a constant presence. For me she always seemed to be there, ever since I was a little boy.

"And as I got older, I realised that she had an incredible ability to speak thoughtfully, authentically and persuasively to many different kinds of people about her relationship with Jesus.

"We noticed this in her Christmas messages and on other occasions.

"In many ways, she has been the single most significant religious presence in the world, and it is why people of different faiths and denominations felt a profound encouragement and confirmation in her words."

The composition was created with the funeral in mind, but the Scot revealed it also incorporated a celebration of the Queen's life.

"I always love setting the word Alleluia," he said. "It may seem a paradoxically joyful word for a funeral, and this new piece culminates in a series of ecstatic Alleluias, the eight separate parts rippling up and down before resting on a serene Amen.

"I suppose this was my own way of expressing joy at the gift of Elizabeth’s life."

While he was invited to attend the service at Westminster Abbey he chose to watch and listen from home.

The service was sung by the Choirs of Westminster Abbey and His Majesty’s Chapel Royal, St James’s Palace, directed by James O’Donnell. 

The Scottish composer said he was "delighted" with how they performed the anthem.

However, it is not an easy task for the choristers.

He said: "Is it difficult to sing? Well, every choral singer will know that any unaccompanied choral music has its challenges, and this piece also divides into seven and eight parts, so the singers need to be confident with that level of complexity.

"I’ve worked with choirs and written for them for many years, and I value their profound place and significance in the ecology of British musical life."

"I can imagine that good amateur choirs, and not just the great professional ensembles, would do a good job with this music."

Mr MacMillan added: "I especially look forward to Scottish choirs singing it!"

Speaking on his choice to not travel down to London, he revealed he had been hard at work preparing for this year's Cumnock Tryst festival. 

The event will take place on September 29. 

"This has been my labour of love since 2014 and choral music features quite centrally in it every year," he said.

"I’m so looking forward to welcoming our guests again, from home and abroad to East Ayrshire’s little musical gem."