The Thursday memorial was part of a weeklong tribute to Mr. McCain, who succumbed last week to brain cancer. Following the service, the coffin carrying Mr. McCain was taken by motorcade to the Phoenix airport and transferred to military aircraft for one final trip to the nation’s capital. In Washington, Mr. McCain will lie in state in the Capitol on Friday before a memorial service on Saturday at the National Cathedral. He will be buried near his alma mater, the Naval Academy, in Annapolis, Md., on Sunday.

[See the full schedule of memorial events planned for Mr. McCain.]

But it was this state that Mr. McCain represented for 35 years in Congress. On Thursday, as a giant video screen above the stage displayed the red-and-green hues of Sedona, he was hailed as an Arizona icon in a ceremony suffused with the culture of the Southwest.

A Navajo flutist performed a hymn, recalling Mr. McCain’s relationship with his state’s native tribes; a choir of children sang the song “Arizona”; and Mr. Fitzgerald invoked the senator’s passion for the state’s sports teams.

“He loved this place,” said Mr. Woods, “and if John McCain fell in love with Arizona, Arizona fell in love with John McCain.”

Before he married his wife, Cindy, and moved here in 1981, Mr. McCain had lived longer in a Hanoi prisoner-of-war camp than he had any other place, a point he made with devastating effect when questioned about his ties to the state in his first House campaign. Arizona voters elected him the following year and supported him every time he was on the ballot, including in two failed presidential bids, up through his re-election to the Senate two years ago.

With his Vietnam heroism and celebrity preceding him, the rootless son and grandson of admirals would eventually become as identified with this state as the political giants he succeeded, Representative John Rhodes in the House and Barry Goldwater in the Senate.