Like the prom, the city of Hamtramck is a mixer of a different kind. Along Joseph Campau Street, a monumental statue of Pope John Paul II presides over Pope Park, with its festive mural of Krakow. A poster for the television program “Bosnian Idol” is displayed in the Albanian Euro Mini Mart, known for homemade yogurt and burek, traditional spinach and meat pies. During her English class, Tharima can hear the call to prayer over loudspeakers from the Islah Islamic Center a few blocks from school.

Diversity was hard-won: The mosque, one of five in the city, was the subject of controversy in 2004, when some people strenuously objected to the city’s decision to allow it to broadcast prayers five times a day; the city ultimately prevailed, regulating the hours when the call may be sounded.

In sharp contrast to earlier immigrants, drawn by the once-thriving auto industry, a quarter of the residents now live below the federal poverty level.

“People here have to work out their difficulties,” said Mayor Karen Majewski, an ethnic historian and Hungarian folk dancer. “There’s no opportunity to hide in your cul-de-sac.”

At Hamtramck High, which has 900 students, many non-Muslims respectfully tuck away their food and water bottles during Ramadan. The prom reflects a broad cultural shift. “Twenty years ago, parents used to pull fifth-grade girls out of school for arranged marriages,” said Chris Bindas, a library aide who brought chocolate-dipped cream puffs to the prom. “Now these same girls are going to college” — albeit a college close to home, where the girls will continue to live with their parents.

Tharima, who plans to work while attending Wayne State University in Detroit, has applied for 27 scholarships, saving all the rejection letters.

“These are my weaknesses,” she said of her financial struggles. “But they are also my strengths.”

On Saturday night, when the strobe lights started, throwing jewels of light around the room, the shy comments of “Oh, you look gorgeous!” and “Ooh, I love your shoes!” gave way to the sheer joy of music, the girls fist-pumping in unison, some discarding their heels and some hugging one another in disbelief.