NEW YORK - Boxing legend Muhammad Ali died of septic shock after spending five days at an Arizona hospital for what started out as respiratory problems and gradually worsened, succumbing only after his wife and children arrived at his bedside to say goodbye, a family spokesman said Saturday.

"It was a solemn moment," Bob Gunnell said on a nationally televised press conference in Phoenix.

The world is invited to the funeral of Muhammad Ali in his hometown on Friday where the boxing legend's life will be celebrated with a public funeral procession and memorial service, a family spokesman said.

On Sunday, Ali's relatives accompanied his body from Scottsdale, Arizona to Louisville, his hometown in the southern state of Kentucky. After a private family funeral on Thursday, Ali's coffin will be transported through the streets of Louisville on Friday, before a public memorial service at an arena, with former president Bill Clinton among celebrities expected to offer eulogies.

The procession has been organised to "allow anyone that is there from the world to say goodbye," family spokesman Bob Gunnell told reporters. Louisville lowered flags to half-staff in his honor, as fans flocked to the boxer's modest childhood home, now a museum, to pay their respects.

The service will include eulogies from former President Bill Clinton, journalist Bryant Gumbel and comedian Billy Crystal. He'll be buried in a local cemetery with only family watching.

In preparation, Louisville lowered flags in mourning on Saturday as it looked toward Ali's final homecoming.

Outside the Muhammad Ali Center, locals created an impromptu memorial, leaving flowers and written tributes.

A few blocks away at Louisville Metro Hall, Mayor Greg Fischer marveled at the many outsize roles Ali embodied: sports champion, civil rights icon, humanitarian and "interfaith pioneer."

"The 'Louisville Lip' spoke to everyone," Fischer said, referring to the dismissive nickname the press gave the boastful Ali early on his career. "But we heard him in a way no one else could, as our brother, our uncle and our inspiration."

Muhammad Ali , who had suffered for more than three decades from Parkinson's disease, had survived several death scares in recent years, so when he was admitted Monday with breathing problems his family expected him to rebound, Gunnell said. Then things turned serious, and it became clear that he wasn't going to improve.

His family traveled to his bedside, where they remained for about a day before Ali died at 9:10 p.m. local time on Friday (0710 PST Saturday). The official cause of death was "septic shock due to unspecified natural causes," Gunnell said. Septic shock refers to an aggressive, full-body inflammatory response to an infection, and is common among the elderly and those with weak immune systems. The blood pressure plummets, leading to organ failure.

Ali was hospitalised in the Phoenix area early this week, but his condition quickly deteriorated. "His final hours were spent with just immediate family," Gunnell said. "He did not suffer."

The interfaith service is to be conducted at Louisville's KFC Yum! Center in accordance with "Muslim tradition" and in the presence of an imam. Ali will be buried at Cave Hill Cemetery in Louisville, where he was born in 1942.

One of Ali's daughters, Hana Ali, recalled his final moments with family by his side, hugging and kissing him and holding his hands as they chanted Islamic prayers.

"We all tried to stay strong and whispered in his ear, 'You can go now. We will be okay,'" Hana Ali wrote on Instagram. "We love love. You can go back to God now'" she wrote.

"All of his organs failed, but his heart wouldn't stop beating. For 30 minutes...his heart just kept beating. No one had ever seen anything like it. A true testament to his Spirit and Will,” she wrote.

Ali grew up on Grand Avenue in a middle-class but segregated section of Jim Crow-era Louisville, and was inspired to box at 12 by a police officer who heard him ranting about someone who'd stolen his bicycle. The racism he absorbed there as a child influenced the political stands he made years later. But he remained continued to return to Louisville as his legend grew, and the city embraced him as a son.

At the Muhammad Ali Center on Saturday, CEO Donald E. Lassere read a statement from the institution, which said Ali "will be remembered for his love for all people, his athleticism, his humanitarian deeds, social justice and perhaps mostly his courage in and out of the ring."

Lassere added: "And I'm sure Muhammad would want me to say this as well: he would want to be remembered for how pretty he was."  Fischer asked his audience outside Metro Hall to imagine what it must have been like to witness Muhammad Ali , born Cassius Marcellus Clay Jr. in 1942, as an infant — his long, remarkable life still ahead of him.

SPECIAL CORRESPONDENT/AFP