Brazilian president Dilma Rousseff has signed into law a bill that in principle allows the sale of beer during 2014 World Cup matches.
Football's world governing body, Fifa, had demanded a change in Brazilian legislation banning alcohol at football matches.
The new bill, setting a number of rules for the World Cup, does not mention any restriction on the sale of alcohol.
Correspondents say state governors may still ban beer sales during the event.
Beer sales have been illegal at football matches in Brazil since 2003.
The ban was introduced as part of measures to tackle violence among rival fans and hooliganism.
Earlier this year Fifa's General Secretary, Jerome Valcke, made it clear that the right to sell beer must be enshrined in legislation on the World Cup in the Brazilian Congress.
In a visit to inspect venues in the 12 Brazilian cities where matches are due to be played, he was adamant.
"Alcoholic drinks are part of the Fifa World Cup, so we're going to have them. Excuse me if I sound a bit arrogant but that's something we won't negotiate," he said.
"The fact that we have the right to sell beer has to be a part of the law."
Brewer Budweiser is a big Fifa sponsor.
Health Minister Alexandre Padilha and other members of Congress called for the ban to be maintained.
But the new law on the World Cup was approved last month by Congress and signed into law by President Rousseff without any mention of a ban on alcohol sales.
Analysts have pointed out that the ban on the sale of alcoholic drinks is enshrined in legislation in some of the nine states where World Cup matches will be played.
By failing to mention the sale of alcohol, the legislation leaves room for opposition state governors and mayors to keep their own ban.
Opposition politicians in the Congress have reacted angrily to the final version of the bill, accusing the central government of playing politics with Fifa and passing on a potentially unpopular decision to them.