Approved on 2 March by 352 votes to 60, the biosafety law states that all products containing GM crops will need to be clearly labelled.
The law also allows research using stem cells from human embryos produced by in vitro fertilisation, provided the embryos have been frozen for more than three years or if they would be unlikely to survive if they were transferred to a woman's uterus.
In either case, the donors' permission will be required before embryos can be used for research.
Brazilian religious groups opposed this aspect of the legislation, calling instead for a total ban on stem cell research.
Another controversial aspect of the law is the power it gives to the National Technical Commission of Biosafety, which is part of the Ministry of Science and Technology. According to the bill, the commission will be responsible for deciding which GM crops can be sold.
However, not all areas of the government agree with the legislation. The Ministry of Environment has said that the new legislation would relegate those public bodies that are responsible for the environment, agriculture, fishing, and health to a secondary role in policymaking relating to GM crops.
This, says the ministry, will create an imbalance in the decision-making process and weaken the safety measures taken to manage the introduction of GM crops.
Silvio Valle, an expert on biosafety at the Oswaldo Cruz Foundation in Rio de Janeiro, says the scientific community felt that stem cells and GM crops should not have been put together in the same bill.
The legislation will be finalised when Brazil's president, Luiz InĂ¡cio da Silva, signs it.