Political leaders turned out to pay tribute to former Scotland Office minister David Cairns at his funeral today.
The Labour MP for Inverclyde died last week at the age of 44 after becoming ill with acute pancreatitis.
He leaves behind his partner Dermot, father John and brother Billy.
The funeral service took place at St Patrick's Church in Greenock.
Labour leader Ed Miliband and Scottish Labour leader Iain Gray were in attendance, along with former chancellor Alistair Darling, ex-Scottish secretary Jim Murphy and shadow Scottish secretary Ann McKechin.
Mr Miliband said: "I think we can see from the great turnout from people here in Greenock, and people from across the political spectrum, the esteem in which David was held.
"It is a tragic loss at such a young age, a tragedy for his family, a bad loss for the Labour Party and he will be very badly missed.
"His blend of principle, warmth and passion for the issues he cared about was a very unusual one.
"He was a pioneer, the first former Catholic priest to sit in Parliament - a law was changed to make it possible for him to enter Parliament.
"He brought a sense of joy and optimism and those things are sometimes in short supply in politics and so it'll be badly missed."
The order of service included a message from Mr Cairns' father and brother thanking his family, friends, and colleagues for coming to pay their respects.
The message said: "The whole family is immensely proud of everything David achieved throughout his life.
"We will all remember David for his warmth, generosity and good sense of humour. He will be sadly missed and remembered forever."
Many of Scotland's Labour MPs were also in attendance.
Speaker of the House of Commons John Bercow was at the funeral, as was Scotland Secretary Michael Moore, a Liberal Democrat MP.
Large numbers of local people attended and readings were given by children from Notre Dame High School, which Mr Cairns attended as a boy.
Former prime minister Tony Blair, who first appointed Mr Cairns as a minister in his government, gave a reading at a receiving mass at Mr Cairns' former church in Clapham, where he was a priest in the 1980s, last night.
John Reid also gave a reading, and it was attended by the majority of Labour's UK MPs and many parliamentarians from other parties.
The order of service featured pictures of Mr Cairns throughout his life, as a child praying before a church altar, playing on a scooter and playing cowboys and Indians, as a teenager reading a comic, as an MP outside the House of Commons, and as a minister at the door of No 10.
The Scottish Government was represented at the funeral by Bruce Crawford, Cabinet Secretary for Parliamentary Business.
In his role as minister for parliamentary business in the last parliament, Mr Crawford held regular discussions with the late Mr Cairns when he was a minister at the Scotland Office, on the business of co-operation between the two administrations, the planning of legislative consent motions, and other such important issues.
Mr Crawford carried the condolences of the Scottish Government and Scottish National Party for Mr Cairns' family and friends.
The service was delivered by Father John Morrison.
He said: "As a politician and a member of parliament, David was a man of hope.
"His public service, his service to the wider community was characterised by a sincere and deep desire to give others opportunity and hope, the hope of a better tomorrow, the hope of a fairer future.
"But, as David well knew, as his family knows, Christian hope goes beyond this life to the life of the world to come, and this is what we pray for today.
"In his political life, David was a dedicated parliamentarian, a committed minister and a passionate campaigner for social justice.
"He was an effective representative of his constituents, who was respected across the political spectrum and far beyond.
"David had time for everyone and had a wonderful sense of humour. Politics in Inverclyde and Westminster will be poorer without him."
Mr Cairns was first elected to the Westminster Parliament in 2001 as Labour MP for Greenock and Inverclyde.
Parliament had to reverse a law dating back to the 19th century which banned former Catholic priests from taking up a seat.
He resigned from the Labour government in September 2008 during the fall-out over Gordon Brown's leadership.
Mr Cairns' death sparks a by-election in Inverclyde where he had a majority of 14,426 in last year's general election.