Brazil have regained compliance with the World Anti-Doping Agency (WADA) Code and have been removed from the non-compliant list, it has been announced.
The decision was taken following a circular vote of the WADA Foundation Board.
The 2016 Olympic and Paralympic host country were declared non-compliant at a Foundation Board meeting in Glasgow last November.
They were "deemed not to have 2015 Code compliant legal framework in place".
WADA has now announced that Brazil has "successfully adopted procedural rules in line with the Code in order to regulate the activity of its newly established Disciplinary Tribunal".
The removal of Brazil from the list means only the Russian Anti-Doping Agency (RUSADA) are non-compliant after Azerbaijan and Indonesia regained compliance in February.
Russia were declared non-compliant by WADA in November 2015 following the publication of the first Independent Commission report, which uncovered allegations of widespread evidence of doping in Russian sport.
"WADA continues to work with the last remaining non-compliant signatory (the Russian Anti-Doping Agency – RUSADA) to address its outstanding issues," WADA said in a statement.
Officials in Brazil had been expecting to regain compliance at an earlier date, with Eduardo de Rose, a member of the WADA Executive Committee and the President of the Pan American Sports Organization Medical Commission, telling the 38-strong Foundation Board in November that he did not expect Brazil to be non-compliant for long.
He claimed at the time that the issues in Brazilian anti-doping were being fixed.
Brazil being non-compliant represented an embarrassment for the country, with their declaration of non-compliance coming after a WADA Independent Observers report, published in October, highlighted a number of "serious failings" in the anti-doping programme at Rio 2016, "some of which" were within the control of the Organising Committee.
This included a loss of service due to budget cutbacks as well as "tensions" between organisers and the Brazilian Anti-Doping Agency.
It was also revealed that more than 4,000 athletes were not drug tested in 2016 before competing at the Games.
Brazil was criticised by WADA during the Olympics in August for halting its drug testing programme in the build-up to the Games.
The country's Sports Ministry confirmed no anti-doping tests were carried out between July 1 and July 24, a move described by WADA as "unacceptable".
Brazil claimed the decision was made after WADA suspended its testing laboratory in Rio de Janeiro in June.
The suspension was subsequently lifted, leading WADA to question why the second largest team at the Olympics was not being properly monitored at such a "crucial time".
Brazil were briefly placed on a watch-list by WADA’s Foundation Board in November 2015, but the establishment of a unique Brazilian anti-doping tribunal and the implementation of the Code within their legal system saw them avoid being declared non-compliant in March last year.