Then came the Trumps. First Lady Melania stood and cordially shook hands with the Obamas and Bill Clinton, and a little wave to Hillary, as her husband took off his coat. Trump plopped down into the end seat before shaking hands with Barack Obama, who nodded formally, and Michelle, who forced a smile and “Good morning”. He did not greet Bill Clinton or his wife, Hillary, who was Trump’s rival in the rancorous 2016 presidential campaign.

It was all in the body language. The Obamas and Clintons now sat staring ahead, visibly tense, their earlier banter quite gone. Barack Obama looked strangely self-conscious; Michelle wore a permanent grimace, Bill and Hillary had stiffened. Trump had deadened the atmosphere like a standing chill.

The contrast was brutal a few minutes later when the Obamas greeted George W Bush with warm smiles. Bush handed Michelle a piece of candy, just as he did at Senator John McCain’s funeral earlier this year. Bush would later break down in grief at the end of a eulogy that was in turns poignant and funny.

It was a rare gathering of five presidents including Trump, Bush and Clinton. It was also the first time that Trump had come face to face with the Obamas and Clintons since his inauguration and dystopian first presidential speech, in January 2017. Over the past two years their mutual antipathy has deepened. On Wednesday, Trump was the odd man out as Republicans and Democrats came together in, rare these days, bipartisan comity.

Bush, the 41st president and last president from the second world war era, died last week at home in Texas. At 94, he was the longest-lived president in US history.

Whereas McCain’s funeral had delivered blunt rebukes to the absent Trump – who was pointedly not invited – in all but name, Bush’s was a case of less is more. The homages to a complex, patrician figure who called for a “kinder, gentler” nation threw Trump, the 45th president, into sharp relief.

In an elegant eulogy, historian Jon Meacham, who wrote a definitive biography of Bush, described him as “America’s last great soldier-statesman” who “stood in the breach in Washington against unthinking partisanship”. He added: “An imperfect man, he left us a more perfect union.”

Meacham drew a comparison with Abraham Lincoln, suggesting that both presidents “called on us to choose the right over the convenient, to hope rather than to fear and to heed not our worst impulses but our best instinct”.

There was also humour. Meacham recalled that Bush, campaigning in a crowd in a department store, once shook hands with a mannequin. Instead of flushing in embarrassment, he simply quipped: “Never know. Gotta ask.”

Bush was the first president since John Adams in the early 19th century to see his son also reach the White House. George W Bush quipped: “The idea is to die young as late as possible.”

As Trump sat with arms folded, the 43rd president recalled: “Last Friday, when I was told he had minutes to live, I called him. The guy who answered the phone said, ‘I think he can hear you but he hasn’t said anything for most of the day.’ I said, ‘Dad, I love you and you’ve been a wonderful father’. And the last words he would ever say on Earth were, ‘I love you, too.’”

Donald Trump sits with first lady Melania Trump, former President Barack Obama, former first lady Michelle Obama, former President Bill Clinton and former first lady Hillary Clinton, former President Jimmy Carter and first lady Rosalynn Carter in the front row at the state funeral for former President George HW Bush at the National Cathedral.Photograph: Kevin Lamarque/Reuters

George W Bush spoke fondly of his father’s bad dancing and dislike of vegetables, “especially broccoli”.

At the end, he choked up on the words, “The best father a son or daughter could have”, and lowered his head, then continued: “And in our grief, let us smile knowing that dad is hugging Robin and holding mom’s hand again,” – a reference to George HW Bush’s three-year-old daughter Robin, who died from leukemia in 1953, and his wife Barbara, who died earlier this year.

It was a revealing, very human moment from a man whose presidency brought about the Iraq war. Once widely reviled, Bush has gained public sympathy in a new role as a grieving son, though the cost of the war reverberates to this day.

The state funeral’s 3,000 invited guests included Prince Charles and leaders of Germany, Jordan, Australia and Poland, along with a host of former world leaders, such as the former British prime minister John Major, who was in office during Bush’s single 1989-1993 term.

Bush’s remains later arrived at a Houston church, where he was to lie in repose overnight. About 1,200 mourners are expected for a service at St Martin’s Episcopal church on Thursday morning. Eulogies were to be delivered by James Baker, Bush’s former secretary of state and longtime confidant, and Bush’s grandson George P Bush, the Texas land commissioner.

The casket will later travel on a train pulled by a special locomotive, No 4141, from suburban Houston to College Station, home of Texas A&M University’s Bush presidential library. The former president will be laid to rest alongside his wife, Barbara, and their daughter, Robin.

Bush, who had been Ronald Reagan’s vice-president, steered the US through the end of the cold war. But while his foreign policy achievements were profound, he faltered domestically, notably with the economy and combating Aids, and lost the 1992 election to Clinton.

Wednesday marked the first time since Lyndon Johnson’s death in 1973 that a sitting president was not asked to eulogise a late president.