SÃO PAULO, Brazil — After the curtain fell on opening night, José Possi Neto, the director of “Nice Work if You Can Get It,” climbed to a rooftop terrace above the Teatro Cetip, high atop the traffic-clogged streets of Brazil’s largest and wealthiest city, and pushed his way through 150 or so of the glitterati who had gathered to celebrate the show.

Kissing cheeks and accepting praise from fellow members of the musical theater world, he gushed about the talent of his actors. He raved about the quality of Broadway shows that in recent years have flourished here in translation. Then, when asked about the future outlook for musicals, he balked: “Pessimism,” he said in Portuguese, has taken root in Brazil.

A decade of economic vibrancy, starting around the turn of this century, enriched Brazilians, who began to flock to Broadway productions, both in New York and in their country. São Paulo, Rio de Janeiro and other cities became prime destinations for New York producers looking to get more mileage out of their shows. They attracted new audiences from a population of some 200 million who grew up on the music and theatrics of Carnival and the melodrama of telenovelas.

But there are signs that Brazil’s musical theater boom is on the wane as the country slips into a deepening recession that began late last year. Unemployment and inflation are on the rise; the economy is expected to shrink this year; and a massive corruption scandal has shaken public confidence.