The World Anti-Doping Agency announced Wednesday it has lifted the suspension from the Brazilian lab imposed in 2013 due to repeated failure to meet WADA standards.
A newly built Laboratorio Brasileiro De Controle De Dopagemo has met the agency's requirements and was accredited to handle athlete's blood and urine samples.
Marco Aurelio Klein, head of Brazil's anti-doping agency who attended the WADA executive committee and foundation board meetings this week, said the lab will begin analysing samples as soon as he gets home.
About 2,500 samples are planned to be tested there this year.
During the FIFA World Cup last summer, players' samples had to be flown to a lab in Lausanne, Switzerland for testing.
WADA president Craig Reddie said that would be impossible at an Olympics, where results are needed more quickly. Teams play every four days at a World Cup, but sprinters and other Olympic athletes may have two or more events in the same day.
He said a task force was formed to help Brazil get its lab up to standards.
And he called lifting the suspension the most important decision from the two days of meetings.
"This is absolutely essential to the proper conduct of an Olympic Games," said Reedie. "You can't have a situation where athletes go into competition and then find out the laboratory didn't do their job properly."
Brazilian sports minister George Hilton, who attended the meetings, said his country's athletes will undergo extensive testing leading up the Olympics in the hope that none test positive at the Games.
"Our goal is to have the cleanest Olympic Games in history," Hilton said through an interpreter.
Testing at an Olympics is massive job. More than 5,000 samples were analysed at the 2012 Games in London and another 1,500 at the Paralympics.
"We don't know the number yet for Rio, but it's absolutely mandatory to have a fully accredited laboratory to host the Olympics," said Klein.
The lab in Ankara, Turkey, which was closed in 2011 after a false positive test on U.S. basketball player Diana Taurasi, was also re-accredited.
Both labs were "subject to multiple site visits; participation in WADA's external quality assessment scheme and ISO assessment by independent accreditation bodies," the agency said in a statement.
Also, the University of Chile Laboratory in Santiago was granted WADA candidate laboratory status and will be considered for future accreditation.
The liveliest debate of the day was on whether six countries that have not taken steps to comply with the World Anti-Doping Code should be sanctioned.
Some, including Canada's Dick Pound, favoured declaring North Korea, El Salvador, Guinea-Bissau, Virgin Islands, Sierra Leone and Haiti non-compliant right away while others called for patience.
Reedie said if a country is declared non-compliant WADA would inform the International Olympic Committee and other sports organizations and it would be up to them whether to let them compete.
"My guess is that information, that they might be declared non-compliant, might just encourage the anti-doping people in North Korea to get their finger out and become compliant," said Reedie. "We're not in the business of keeping them out of sport permanently.
"We're in the business of them having the proper set of rules."
The board also agreed to start asking researchers to submit bids for research on doping. The IOC and a group of 14 countries put up $12 million, outside of WADA's normal budget, for "innovative and new" research projects.