Cardinal Keith O'Brien, formerly the Catholic Church's most senior cleric in Britain, has died at the age of 80.
The cardinal, who resigned as Archbishop of St Andrews and Edinburgh in 2013 after apologising for sexual misconduct, was hurt in a recent fall.
He was being cared for in Newcastle and was transferred to hospital there after suffering a head injury.
His successor administered the last rites on Friday, on the eve of the cardinal's 80th birthday.
Commenting upon the news of his death, Archbishop Leo Cushley of St Andrews and Edinburgh said: "In life, Cardinal O'Brien may have divided opinion.
"In death, however, I think all can be united in praying for the repose of his soul, for comfort for his grieving family and that support and solace be given to those whom he offended, hurt and let down. May he rest in peace."
Cardinal O'Brien resigned in February 2013 after three priests and a former priest alleged improper conduct back in the 1980s.
He initially contested the allegations but later apologised, saying his sexual conduct had "fallen beneath the standards" expected of him.
The fall of a cardinal - Martin Bashir, BBC religion editor
The collapse of Cardinal Keith O'Brien's formidable reputation, though late in his career, was sudden and steep. Up until his 75th birthday, in 2013, he was one of the most senior figures in Scottish Catholicism and a highly decorated cleric.
He received several honorary doctorates, both from Scottish and overseas universities, and held the position of Bailiff Grand Cross of Honour and Devotion among the Knights of Malta, one of the ancient chivalric orders.
The Observer first reported the allegations of four individuals who accused Cardinal O'Brien of inappropriate sexual behaviour, within the Diocese of St Andrews and Edinburgh. He initially contested the allegations but took the unprecedented decision not to take part in the Papal conclave, which elected Pope Francis.
The Herald, in 2015, suggested that Cardinal O'Brien had used confession by young clerics as a device for sexual grooming.
The charge of hypocrisy was further compounded by his outspoken opposition to same sex marriage and apparent defence of traditional morality while allegedly engaged in predatory behaviour.
Cardinal O'Brien's health had deteriorated since the fall last month in which he broke his collarbone and suffered a head injury.
The Little Sisters of the Poor, who run a nursing home in Newcastle upon Tyne, were caring for him.
Archbishop Cushley visited him in hospital to administer the sacrament.
Keith O'Brien was born in Ballycastle, County Antrim, in 1938.
He was educated in Scotland, attending St Patrick's High School in Dumbarton and Holy Cross Academy in Edinburgh.
After graduating from the University of Edinburgh, he attended St Andrew's College in Drygrange, being ordained as priest in April 1965.
His first post as an assistant priest was at Holy Cross in Edinburgh.
He was ordained as Archbishop of St Andrews and Edinburgh in 1985, and became cardinal in 2003.
Retiring from public life, he said: "I wish to take this opportunity to admit that there have been times that my sexual conduct has fallen below the standards expected of me as a priest, archbishop and cardinal. To those I have offended, I apologise and ask forgiveness.
"To the Catholic Church and people of Scotland, I also apologise. I will now spend the rest of my life in retirement. I will play no further part in the public life of the Catholic Church in Scotland."
Pope Francis accepted his resignation and stated Cardinal O'Brien would not take part in future papal elections, act as papal adviser, or take part in Vatican congregations and councils and would lose other roles as a cardinal.
Alan Draper from In Care Abuse Survivors (INCAS), was also a former advisor to the Catholic Church.
He said: "The church continually showed a lack of compassion towards survivors, or any understanding of what they've suffered emotionally, physically and spiritually. And that is a key issue - the spiritual damage caused to abuse survivors.
"They were shocked and were concerned with a man with immense power who abused that power.
"There was this man living a double life effectively, saying homosexuality was bad and yet was leading a homosexual life himself. What we are seeing is double standards and it is not acceptable."
Catherine Deveney is the Observer journalist who broke the Cardinal O'Brien scandal.
She says the issues around what happened were bigger than one man: "He was a symptom of an organisation that had lost its way.
"Keith O'Brien was not a monster, he wasn't an ogre - he was just a weak man.
"And I hope in the last years of his life when he took off the mitre, took off the cardinal's robes, he found something more real.
"I hope he found peace at the end of his life and I think his victims would wish that for him too."
The president and vice-president of the Bishops' Conference of Scotland have also offered their condolences.
Archbishop Philip Tartaglia said: "On behalf of the Bishops' Conference of Scotland I wish to express my sincere sympathy on the death of the late Cardinal to his family and close friends. I ask for prayers for the repose of his soul. May he rest in peace."
Bishop Joseph Toal added: "I will pray for the eternal repose of the soul of Cardinal Keith Patrick O'Brien. I extend my sympathy and prayerful support to his family, friends and all who mourn his passing. With constant hope in the Lord's goodness and mercy."