The text passed the Senate with 17 of 30 votes, and will be forwarded to the president for his signature or veto in the coming hours, according to a leading senator and physician, Monica Xavier.
Approved last week by the lower House of Deputies, the bill would allow a woman to "decide to end her pregnancy in the first 12 weeks of gestation," because of economic, family or age hardship.
In addition, abortion would be legal for health, deformation or risk to the mother's life.
Xavier called the move a "milestone" and a "big step forward" for women in Uruguay, where every form of abortion has been illegal for 70 years.
The Roman Catholic church voiced "deep discomfort" with the bill and said anyone who participated directly in stopping a pregnancy would be excommunicated.
"It is news to regret, and for that all we can hope for is for President Vazquez to do what he said he would," Luis del Castillo, secretary the Bishops' Conference in Uruguay, told AFP.
The president, also a doctor by profession, has said he will veto the measure, which would require a three-fifths majority in Congress to override.
"The Law of Sexual and Reproductive Health contains positive elements that should be preserved, but there are others with which I disagree, philosophically and biologically, and they will be vetoed," Vazquez said a year ago.
A recent poll by the firm Interconsult showed 57 percent of Uruguayans support access to abortion while 42 percent oppose it.