The funeral service was turned into a celebration of the life and legacy of the music icon.

Aretha Louise Franklin, a US music icon who died earlier in August at the age of 76, has been given a star-studded, six-hour funeral in her hometown Detroit in the state of Michigan.

Political dignitaries and music royalty joined the family, friends and thousands of the members of the public on Friday to bid goodbye to the singer dubbed the Queen of Soul, known for her singular, soaring voice.

The funeral service, a celebration of Franklin’s life and legacy, featured emotional tributes by high-profile politicians and civil rights leaders.

Remembering Franklin’s “breathtaking talent”, Bill Clinton called her “the voice of the century”.

“We started out, not as a president, a first lady, a senator, a secretary of state. We started out as, like, Aretha groupies or something,” added the former president, who was accompanied by his wife and former secretary of state, Hillary Clinton.

Clinton plays Franklin’s song on his phone while speaking at the funeral [Mike Segar/Reuters]

Clinton also said he was happy that Franklin’s coffin was still open when he arrived because he just had to see what she was wearing.

“I wonder what my friend has got on today. I wanted to see what the girl was carrying out,” Clinton said, to a wave of laughs and claps from the crowd.

For three days, Frankin lay in a golden, open-coffin, dressed in a different outfit each day – red on Tuesday, blue on Wednesday, rose gold on Thursday – and a golden sparkling dress for her funeral on Friday.

Clinton ended his address by playing Franklin’s mega-hit Think on his phone into the mic. “It’s the key to freedom,” he said.

‘Soundtrack to civil rights movement’

Others who attended the funeral included civil rights leaders Jesse Jackson and Al Sharpton and singers such as Stevie Wonder and Smokey Robinson.

Sharpton called Franklin’s music “the soundtrack to the civil rights movement”.

Sharpton also read a statement from former president Barack Obama, who wrote that Franklin’s “work reflected the very best of the American story”. Another statement from George W Bush, another former president, said she would continue to inspire future generations.

Sharpton received loud cheers when he criticised President Donald Trump for saying that the singer “worked for” him in a statement after her death.

“She performed for you,” Sharpton said of Franklin, who had sung at Trump-owned venues. “She worked for us.”

Having sung at the inaugurations of three presidents – Jimmy Carter, Clinton and Obama – Franklin was considered an American institution. In 2005, she was awarded the Presidential Medal of Freedom.

Star-studded tribute

The Detroit church swelled with gospel music for the funeral, driving mourners to their feet to clap and sing. “Come on, this is a church service, lift your voice!” Bishop Charles Ellis III exhorted the congregation.

After Bible readings, Faith Hill sang the old standard, What a Friend We Have in Jesus, which Franklin included on her 1972 live album, Amazing Grace. Ariana Grande sang one of Franklin’s biggest hits, (You Make Me Feel Like) A Natural Woman.

Al Jazeera’s John Hendren, reporting from Detroit, said that 1,000 “lucky” locals were initially allowed by the Franklin family to attend the funeral, but the invitation-only event was opened for the general public at the last moment.

“It was probably the biggest funeral of the year in this part of the US,” Hendren said.

Franklin was Detroit royalty

Programme covers showed a young Franklin, with a slight smile and sunglasses perched on her nose, with the caption saying: “A Celebration Fit For The Queen”.

Detroit regarded Franklin as royalty.

Detroit residents wait to attend Aretha Franklin’s funeral [Tony Dejak/AP]

“This is as close you get to royalty here in America and Aretha earned every bit of it,” Missy Settlers, a 53-year-old automotive parts assembler, told Reuters news agency.

On Thursday, more than 30 artists performed for thousands at a free concert, billed A People’s Tribute to the Queen, at Detroit’s Chain Park, which is likely to be renamed Aretha Franklin Park.

Franklin died of pancreatic cancer on August 16, closing the curtain on a glittering six-decade career that spanned gospel, R&B, jazz, blues and even classical music, and turned her into a natural resource in Michigan, where she stayed all her life.

Franklin had influenced generations of female singers from the late Whitney Houston to Beyonce, with unforgettable hits including, Respect (1967), Natural Woman (1968) and I Say a Little Prayer (1968).

Born in 1942 in Memphis, Tennessee, Franklin went on to win 18 Grammy awards and was voted the greatest singer of all time by Rolling Stone magazine.