Former presidents Barack Obama and George W Bush headed an elite gathering of political heavyweights at the memorial service for Senator John McCain at Washington’s National Cathedral.

The Vietnam War hero, who became one of America’s most high-profile politicians, died a week ago from brain cancer at the age of 81.

His daughter Meghan spoke ahead of the former presidents, saying her father’s death was “the passing of American greatness”, as she directed a message squarely at President Donald Trump while encouraging others to live up to her father’s example.

Meghan McCain Meghan McCain speaks at the memorial for her father (Pablo Martinez Monsivais/AP)

In her tearful, impassioned tribute she said they “gather here to mourn the passing of American greatness — the real thing, not cheap rhetoric from men who will never come near the sacrifice he gave so willingly, nor the opportunistic appropriation of those who lived lives of comfort and privilege while he suffered and served.”

She said to applause, “The America of John McCain has no need to be made great again because America was always great.”

Ivanka Trump and her husband Jared Kushner were are among the highest-ranking White House officials attending after Mr McCain’s family made it clear that Mr Trump was not invited.

He had been routinely criticised over his military record by the US president, who spent some time ahead of the service tweeting out a series of long-standing grievances about the news media, Canada and the Justice Department.

 Barack Obama hugs Al GoreFormer President Barack Obama hugs former vice president Al Gore (Pablo Martinez Monsivais/AP)

The Arizona senator had asked Mr Obama and Mr Bush to speak at the service to highlight the bridge-building that he espoused. Both men had defeated Mr McCain’s own bids for the nation’s highest office.

Mr Kushner and Mrs Trump could be seen greeting other guests inside the cathedral, including McCain’s close friend, South Carolina Sen. Lindsey Graham.

Graham had called Trump’s handling of the events around the Arizona senator’s death “disturbing.”

The administration had lowered the American flag at the White House to half-mast upon McCain’s death Saturday, but then raised it on Monday. After a public outcry it was lowered once more.

During the procession to the cathedral, the hearse stopped at the Vietnam Veterans Memorial, where Mr McCain’s wife Cindy placed a wreath.

She was accompanied by Defence Secretary Jim Mattis and Mr Trump’s chief of staff John Kelly, who is a retired Marine Corps general.

Mr McCain was a decorated veteran who was held for more than five years as a prisoner of war in Vietnam where he refused early release.

Mr McCain will be buried on Sunday at his alma mater, the US Naval Academy in Annapolis, Maryland.