MIAMI — During the years that shaped modern Miami, Mayor Maurice A. Ferré held on to power for more than a decade despite race riots, a chaotic mass migration of Cubans arriving by boat and the unpredictable boom-and-bust cycle of neighboring Latin American economies .

But Mr. Ferré, Miami’s first Hispanic mayor, ultimately could not withstand the city’s demographic transformation. A Puerto Rican, he lost his mayoralty in 1985, two years after a rival introduced the campaign slogan “Cubano vota cubano” — a Cuban votes Cuban. Defeated in his re-election bid, he was succeeded by Xavier Suarez, the city’s first Cuban-born mayor.

Mr. Ferré, who led Miami through a defining period of growth and tumult beginning in 1973, died on Thursday at his home in the Coconut Grove neighborhood of the city. He was 84 .

The cause was cancer, according to a family statement.

Mr. Ferré had been sick for two years, and his treatment forced him to rely first on a walker and then on a wheelchair. But he still showed up at City Hall in recent years, in one instance to oppose a plan to develop a waterfront park that had been renamed in his honor. And he urged local Democrats not to take Latino voters for granted in 2020.