Former President George W. Bush and former first lady Laura Bush, left, follow the casket of former President George H.W. Bush as it is carried out following a State Funeral at the National Cathedral in Washington, Wednesday, Dec. 5, 2018. Credit: Susan Walsh | AP

WASHINGTON — Mourners from across the nation gathered Wednesday morning to pay their respects and celebrate the life of former President George H.W. Bush at a state funeral at the Washington National Cathedral.

With President Donald Trump and four living former U.S. presidents in attendance, Bush was remembered by his son former President George W. Bush who said that his father had “showed me what it means to be a president that serves with integrity, leads with courage and acts with love in his heart for the citizens of our country.”

He also remembered his father as someone who “valued character over pedigree,” who “showed us how setbacks can strengthen,” and who, with his optimism, “made his children believe anything was possible.”

[See all George H.W. Bush coverage here]

George H.W. Bush “could tease and needle but never out of malice,” his son said, with Trump sitting in the front row.

He elicited a few laughs from the crowd, particularly when he recalled his father’s longtime friend, James Baker, sneaking him Grey Goose vodka and steak when Bush was in the hospital in his later years.

His father also enjoyed a good joke and had an email list where he and others would share their favorites — including some off-color jokes, Bush said.

[Maine barber reflects on friendship with George H.W. Bush]

“To us he was close to perfect, but not totally perfect. … The man couldn’t stomach vegetables, especially broccoli,” Bush said, in a reference to the food famously loathed by his father. “And, by the way, he passed these genetic defects on to us.”

He also referenced Bush’s service as a Navy pilot, saying “one reason Dad knew how to die young was that he almost did it — twice,” Bush said, referring to his father having had a staph infection as a teenager and later being shot down in World War II.

“For Dad’s part, I think those brushes with death made him cherish the gift of life,” Bush said.

Bush broke down at the end of his remarks as he recalled his father as the “best father,” and prompted applause from the crowd after saying that he smiles “knowing that Dad is hugging Robin and holding Mom’s hand again.”

Robin was George H.W. and Barbara Bush’s daughter, who died of leukemia at age 3 in 1953.

[Former President George H.W. Bush dies at 94]

Bush was also remembered as “America’s last great soldier-statesman” by biographer Jon Meacham, one of four people delivering eulogies.

Meacham called Bush “America’s last great soldier-statesman.”

“An imperfect man, he left us a more perfect union,” Meacham said of the 41st president.

His remarks included some gentle ribbing of Bush for what the former president had acknowledged wasn’t his strongest suit: public speaking.

“‘Fluency in English,’ President Bush once remarked, ‘is something that I’m often not accused of,’” Meacham said, adding: “His tongue may have run amok at times, but his heart was steadfast.”

[Maine electrician invited to George H.W. Bush’s funeral]

Meacham also recounted Bush being shot down as a Navy pilot in 1944 and barely escaping death.

“And so we ask, as he so often did: Why him? Why was he spared?” Meacham said. “The workings of Providence are mysterious, but this much is clear: the George Herbert Walker Bush who survived that fiery fall into the waters of the Pacific made our lives, and the lives of nations, freer, better, warmer, nobler.”

The second eulogy was given by former Canadian prime minister Brian Mulroney, whose last four years in office overlapped with Bush’s term as president.

“Fifty or 100 years from now, as historians review the accomplishments and the context of all who have served as president, I believe it will be said that in the life of this country, the United States — which is, in my judgment, the greatest democratic republic that God has ever placed on the face of this earth — I believe it will be said that no occupant of the Oval Office was more courageous, more principled and more honorable than George Herbert Walker Bush,” Mulroney said.

[Opinion: No president is perfect on foreign policy, but George H.W. Bush earned high marks]

He hailed Bush’s foreign and domestic policy achievements, including the NAFTA agreement, which he said had been “modernized and improved by recent administrations,” in what appeared to be veiled swipe at Trump’s efforts to terminate the deal.

Mulroney said that when world leaders dealt with Bush, they “knew that they were dealing with a gentleman, a genuine leader, one that was distinguished, resolute and brave.”

Former Sen. Alan Simpson prompted some laughs from the crowd with a self-deprecating speech in which he celebrated his friendship with Bush, which began more than five decades ago in 1962. Bush stood by him through his darkest times, Simpson said.

[At Capitol, Bush saluted as ‘gentle soul,’ ‘great man’]

“My life in Washington was rather tumultuous,” he said. “I went from the ‘A’ social list to the ‘Z,’ and never came back to the ‘A.’ In one dark period I was feeling awful low, and all my wounds were self-inflicted.”

When he questioned Bush about his decision to stay by him, Simpson said Bush responded, “This is about friendship and loyalty.”

Bush loved a good joke, Simpson added, but he “never, ever could remember a punchline — and I mean never.”

The Rev. Dr. Russell Levenson, rector of St. Martin’s Episcopal Church in Houston, delivered the homily, drawing tears from some in the crowd.

“My hunch is heaven just got a bit kinder and gentler. … Welcome to your eternal home, where ceiling and visibility are unlimited, and life goes on forever,” Levenson said.

More than 30 selections were listed on the order of service, beginning with preludes by organ and carillon, a keyboard instrument made up of a set of bells. A handful of contemporary composers were included, including John Williams, whose “Hymn to the Fallen” from the film “Saving Private Ryan” was performed by the United States Marine Orchestra. In another cinematic moment, Aaron Copland’s composition for the 1940 film “Our Town,” based on the Thornton Wilder play, was also performed by the Marine Orchestra.

[Sully, Bush’s service dog, lies by his casket before one last journey with the former president]

Ronan Tynan, a member of the Irish Tenors, sang a version of “The Lord’s Prayer” by Albert Hay Malotte with backing from the Marine Orchestra and two choirs.

Michael W. Smith, the Grammy Award-winning contemporary Christian artist, performed his 1982 hit “Friends” with orchestra and choir.

As the service ended, Bush’s coffin was carried from the church to the sounds of “Hail to the Chief” and placed in a hearse that will take it to Joint Base Andrews in Maryland. The coffin will then be flown to Houston.

An arrival ceremony is scheduled at 6:45 p.m. at St. Martin’s Episcopal Church, where Bush will lie in repose.

Washington Post writers Elise Viebeck, Sueng Min Kim, Patricia Sullivan and Michael E. Miller contributed to this report.