Brazil's cash-strapped government is in talks with lawmakers over legalizing gambling to increase revenues as Congress balks at President Dilma Rousseff's efforts to overcome a budget deficit by raising other taxes.

Rousseff's chief of staff, Aloizio Mercadante, ran the idea by lawmakers last week after they signaled the government will struggle to pass a controversial tax on financial transactions.

Brazil has banned casinos since 1946 and it outlawed bingo halls in 2007 amid concerns they facilitated money laundering, though it allows federal lotteries and bets on horse racing.

Proponents say Brazil, facing its worst recession in 25 years, can no longer afford to forgo what could be 23.5 billion reais ($5.9 billion) in annual gambling taxes — an amount that could have increased during the 2014 World Cup and 2016 Olympic Games.

"When Brazilians want to gamble, they go to Paraguay, Montevideo, Las Vegas ... and they leave all the money there," said Mauricio Quintella, leader of the small, center-right Party of the Republic in the lower house of Congress and one of the lawmakers tasked with leading consultations on the idea.

He supports legalizing gambling, but emphasized that the talks are preliminary.

The office of the president's chief of staff declined to comment on the talks.

The building where Urca Casino operated until Brazil banned casinos, is pictured at Urca beach in Rio de Janeiro, Brazil, Sept. 22, 2015.

Winning over public opinion in a country where many people associate casinos with corruption could be a challenge, however, especially amid the current uproar over a more than $2 billion kickback scheme focused on state-run oil firm Petrobras.

Prior scandals have even been linked to gambling. An aide to former President Luiz Inacio Lula da Silva, for example, was sentenced to 12 years in prison in 2012 for asking for bribes from an illegal lottery operator in 2004.

"You talk about gaming and people think about fraud, money laundering, mafia and addiction," said Luiz Felipe Maia, a Sao Paulo-based lawyer specializing in gaming who believes Brazil's legal gambling market could be worth 70 billion reais per year, about a third of which the government could take back in taxes.

The president of Brazil's national prosecutors' association, José Robalinho Cavalcanti, says legalizing bingo halls would be "a huge step backward," noting that the period in which they were legal was marked by smuggling and money laundering.

"We would have to wait to see if the government's proposal to regulate bingos again will solve all these problems, which unfortunately we doubt," he told newspaper Correio Braziliense.

Past errors

Maia said the key to avoiding past errors and corruption is better regulation, including a new federal agency to oversee payouts and to prevent addictions to gambling.

Brazil would also be able to incorporate new technology that allows casino operators to more closely track money, he said.

Maia said Brazil is among a handful of countries outside the Middle East and Africa that have not implemented laws to regulate gambling.

Brazil has an estimated 18 billion-reai illegal gambling market, mostly consisting of a numbers game known as the "game of animals," and many Brazilians gamble online.