US senator John McCain has been remembered as a "true American hero" and a terrible driver with a wicked sense of humour at a church service that ended with the playing of Frank Sinatra's My Way.
Addressing about 3500 mourners on Thursday, former vice-president Joe Biden recalled "the sheer joy that crossed his face when he knew he was about to take the stage of the Senate floor and start a fight".
Biden, a Democrat who was among the friends the Republican senator made across the aisle, said he thought of McCain as a brother, "with a lot of family fights".
The service for the statesman, former prisoner of war and two-time presidential candidate unfolded at North Phoenix Baptist Church in Phoenix, Arizona, after a motorcade bearing McCain's body made its way from the state Capitol past people waving American flags and campaign-style McCain signs.
McCain died last Saturday of brain cancer at 81.
His longtime chief of staff Grant Woods drew laughs with a eulogy in which he talked about McCain's "terribly bad driving" and his sense of humour.
The church's senior pastor, Noe Garcia, pronounced McCain "a true American hero".
The service ended two days of mourning for the six-term senator in his home state.
McCain's body was then flown to Washington DC for a lying-in-state at the US Capitol on Friday, a service on Saturday and burial at the US Naval Academy in Annapolis, Maryland, on Sunday.
No speakers uttered Donald Trump's name but Biden made a possible veiled reference to the president when he talked about McCain's character and his opposition to those who "lacked the basic values of decency and respect, knowing this project is bigger than yourself".
McCain clashed openly with Trump, who mocked McCain for getting captured during the Vietnam War.
White House officials said McCain's family had asked that Trump not attend the funeral services.
Trump, who had been widely criticised for his muted response to McCain's death, insisted in an interview with Bloomberg News on Thursday he had honoured the senator appropriately.
"I've done everything that they requested and, no, I don't think I have at all," he said in response to a question about whether he had made a mistake and missed an opportunity to unite the country.
Sinatra's My Way paid tribute to a politician who was known for following his own path based on his personal principles.
McCain's widow, Cindy, pressed her face against her husband's flag-draped coffin and daughter Meghan erupted in sobs.
An estimated 15,000 people filed past the senator's casket and McCain's sons Doug, Jack and Jimmy, daughter Sidney and daughter-in-law Renee shook hands with some of them.
Australian Associated Press