Senator John McCain was remembered as a “true American hero” and a terrible driver with a wicked sense of humour at a crowded church service that ended with the playing of Frank Sinatra’s My Way.

Addressing an estimated 3,500 mourners, 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 fast friends the Republican senator made across the aisle, said he thought of McCain as a brother, “with a lot of family fights”.

People watch the motorcade carrying the coffin of John McCain (Jae C. Hong/AP)

The service for the statesman, former prisoner of war and two-time presidential candidate unfolded at North Phoenix BaptistChurch 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.

Family members watched in silence as uniformed military members removed the flag-draped coffin from a black hearse and carried it into the church.

McCain died last Saturday of brain cancer at 81.

McCain’s longtime chief of staff Grant Woods, a former Arizona attorney general, drew laughs with a eulogy in which he talked about McCain’s “terribly bad driving” and his sense of humour.

The church service brought to a close two days of mourning for the six-term senator and presidential nominee in his home state.

A motorcade then took McCain’s body to the airport, where it was put aboard a military aircraft for the flight east for