Brazil's President Dilma Rousseff, right, shown with artist Isabel Mendes da Cunha signed a law Tuesday in Sao Paulo granting grandparents visitation with grandchildren in cases of divorce. (Eraldo Peres/Associated Press)

Brazilian President Dilma Rousseff has signed a law that guarantees grandparents the right to visit their grandchildren when the parents are divorced.

The presidential approval was published Tuesday in the official gazette in Sao Paulo.

The law that Congress approved this month modified a law that had not guaranteed visitation rights for grandparents.