By Fiona Ortiz

CHICAGO (Reuters) - Hundreds of "Hamilton" fans lined up in Chicago for as much as 24 hours in 90-degree heat to buy the year's hottest theater tickets, for the award-winning hip-hop musical about the United States' first Treasury secretary in its debut outside New York.

Cheers went up on the line snaking around the block in downtown Chicago as the box office at the PrivateBank Theatre opened at 10 a.m. on Tuesday. Phone and online sales started at the same time.

Fans in line said their enthusiasm has not waned even though the revolutionary musical biography of Alexander Hamilton will be recast for its Chicago run.

Lin-Manuel Miranda, the composer and playwright who wrote and co-stars in "Hamilton," recently announced that July 9 will be his last performance as the title character in the Broadway production. Co-star Leslie Odom Jr., who plays Aaron Burr, leaves the cast the same day.

"Whoever gets cast will be amazing. (Miranda) will put the best person in place to do the role, someone just as talented as he is," said Cara Maas, 18, a college student who traveled from Grand Rapids, Michigan and joined the ticket line on Monday evening.

"It's a dream come true," Maas said. "I love Alexander Hamilton, the man himself, and I love the fact that there's a musical about him."

Maas made new friends while camped out in the line. They sang along to their favorite songs from the show, which swept the Tonys, taking 11 awards after getting a record 16 nominations.

The racially and ethnically diverse fans in line for tickets in Chicago said the show's diverse cast - with non-whites playing the white founding fathers - drew them to the show.

"Hamilton was an immigrant, and as the daughter of immigrants, the theme really stuck with me," said Rocio Valladares, 24, of Mount Prospect, Illinois, who was in line with Maas.

"Hamilton" will run from Sept. 27 through March 19 next year in Chicago.

Tickets for the New York show have been scarce, with resale prices in the hundreds of dollars and producers taking steps to keep resellers from buying tickets in bulk over the internet.

At 11 a.m. (noon EDT), there were still $117 tickets for sale online for the Chicago show. A half-hour later there were tickets offered at prices ranging from $369 to $8,000 on the StubHub ticket resale website.

(Editing by Jonathan Oatis)