Dilma Rousseff may be one of Brazil's most popular presidents ever but even she knows better than to challenge the prime-time power of the TV phenomenon known as Avenida Brasil.

Rousseff, who enjoys a 62% approval rating, postponed a rally to endorse her party's candidate in a São Paulo mayoral race on Friday because it would coincide with the finale of the telenovela.

The last episode of Avenida Brasil is tipped to be a 70-minute storm of melodrama that includes a polygamous wedding, a celebratory feast and the answer to the question on tens of millions of Brazilian lips: "Who killed Max?"

Against such competition, presidential aides feared the rally would fall flat: even hardcore politicos are likely to stay at home to see the mystery solved.

Several newspapers pointed out that Rousseff is a fan of the show – which has been running up to six days a week since March – and may simply have wanted to be among the 50% of the viewing public expected to tune in for the climax.

It makes political sense for the president to tune into Avenida Brasil's audience, which has come to epitomise the rise of a formerly poor social group that is now in the most powerful consumer stratum in the country.

Brazil's "C-class" – as they are categorised – have grown rapidly in size and influence over the past decade thanks to the growth of the Brazilian economy, widening credit lines and the government's efforts to address income inequality.

Since 2004, the government says, 32 million Brazilians have been lifted out of poverty. Last year, this helped the C-class – defined as those earning between 1,000 and 4,500 reals (£300-£1,400) a month – to constitute for the first time a majority of Brazil's population of 196 million.

Ten years ago, they needed every penny to meet their bills. Today they have enough disposable income to buy mobile phones, laptops and motorbikes. According to a study commissioned by the president's office, the C-class accounts for 76% of supermarket sales and 60% of visits to hairdressing salons.

With this group increasingly beloved by advertisers, TV producers at Rede Globo – the channel that dominates the "telenovela" industry – are angling more shows and lucrative product placement opportunities in their direction.

Few more so than Avenida Brasil, which is named after a busy road in Rio de Janeiro that leads from rundown suburban communities and favela shanty towns into the smart city centre.

Dating back to 1951, telenovelas have long been a feature of Brazilian life and often mix plots from different classes and a range of controversial issues. But rarely has a prime-time drama pushed more C-class buttons.

This is evident in the opening credits, set over a baile charme dance track and images of a pulsating nightclub, and the bling-bedecked cast of characters – a cuckolded footballer, the owner of a manicure parlour and the sparsely clad piriguete party girl, Suelen.

Mariana Zylberkan, a columnist for Veja magazine, says the show represents a shift from the plush restaurants and bossa nova rhythms of upmarket Rio to the barbecues and techno of the C-class.

"The profile of the characters is unprecedented among the telenovelas of the past 10 years," she writes, calculating that 79% belong to the "new middle class".

Marieta Pinheiro de Carvalho, a history lecturer at the University of Rio de Janeiro, said the focus on C-class was becoming a trend.

"In previous novelas, there was too much value placed on the richest class. What is happening now is a classical part of the civilising process: groups that didn't have much power in the past now have more economic and social influence so they are contesting a greater public space."

Reflecting the optimism and the lingering vulnerability of the formerly poor, the plot features spectacular social rises and falls when match-deciding penalties are missed, wrongdoing is exposed and love affairs succeed or go awry.

At least two of the lead characters are raised in rubbish dumps. One plots revenge. The other, Max, has been murdered. The culprit is the source of as much speculation this week as "Who shot JR?" at the 1980s peak of in the US soap Dallas – or the mystery over the killing of Dirty Den in EastEnders in the UK.

But there are distinct differences between British soap operas and Brazilian telenovelas, which tend to run in more intense bursts – every weekday over a roughly eight-month period, ending with a spectacular finale.

This is not that first time that a telenovela has overshadowed politics. In 1993, the impeachment of president Fernando Collor de Mello was pushed off the front pages by the real-life murder of soap opera star Daniella Perez, by the actor who was playing her jealous boyfriend in De Corpo e Alma (Of Body and Soul).

The genre was recently thought to have been in terminal decline as audiences switched from hackneyed storylines to cable TV and the internet, while rivals in Mexico, Venezuela and even South Korea competed in the wider Latin American market. But slicker HBO-like cinematography and a new generation of scriptwriters – such as João Emanuel Carneiro, who wrote Avenida – have revitalised the telenovela by appealing to the young and the C-class.

As Avenida Brasil approaches its finale with another murder, a marriage proposal and the creepy rantings of the father of the suddenly sympathetic villain Carminha, the ratings are creeping closer to the 50% level, which has rarely been seen since the 1990s. The last episode is expected to surpass that.

The outcome is, of course, secret. But showbiz websites predict it will wrap up with a solution to Max's murder, the wedding of the lead characters, and a huge party to mark the opening of a shopping mall in Divino – a perfect happy ending for the advertisers who adore the new consumer class.

Additional reporting by Carolina Massote