LONDON — The leaders of Britain and Ireland joined mourners on Monday for the funeral of politician David Trimble, who shared the Nobel Peace Prize for helping to end decades of violence in Northern Ireland.

U.K. Prime Minister Boris Johnson and Irish premier Micheal Martin joined Trimble’s widow and four children for the service at Harmony Hill Presbyterian Church in Lisburn, southwest of Belfast. Trimble died July 25 at the age of 77.

Irish President Michael D. Higgins, senior British officials and politicians from both sides of Northern Ireland’s Catholic-Protestant divide also attended the funeral, including Trimble’s one-time enemy, the former Sinn Fein leader Gerry Adams.

Trimble, who led the Ulster Unionist Party from 1995 to 2005, became a key architect of the 1998 Good Friday peace agreement after he reversed his long-held opposition to negotiating with the Irish Republican Army-linked party Sinn Fein.

He shared the 1998 Nobel Peace Prize with moderate Irish nationalist leader John Hume for ending three decades of sectarian conflict in which more than 3,000 people died.

Trimble became Northern Ireland’s first minister in the Protestant-Catholic power-sharing government set up under the accord. It was soon rocked by disagreements over disarming the IRA, and Trimble’s party was overtaken in public support by the more hardline Democratic Unionist Party.

Trimble resigned as party leader and lost his seat in Britain’s Parliament in 2005 and spent the final decade and a half of his life as a member of Parliament’s unelected upper chamber, the House of Lords.

Rev. Charles McMullen said in a eulogy that Trimble’s actions had “saved many lives and allowed a generation to grow up in relative peace.”

“History will be exceedingly kind to David, even if life brought many unrelenting pressures and demands,” he said.

“Can we use this service today, in a fitting tribute to one of the great, to redouble our efforts on this island home of ours?”