The abortion is permitted up until the 10th week of pregnancy in Portugal, so in this point the Roman Catholic country is like the most of its European neighbors now, authorities said.
But President Anibal Cavaco Silva recommended that Parliament, which passed the law last month following a national referendum, take further measures to ensure abortions are a last resort.
Parliament voted overwhelmingly to legalize abortion after a referendum in February. Turnout for the ballot was not enough to make it binding but the outcome indicated a majority of voters favored the change which has long been sought by the governing center-left Socialist Party.
Under the constitution, laws passed by Parliament must be rubber-stamped by the head of state.
The abortion law, which was fiercely opposed by the Catholic church, will come into force when it is published in official government records, probably next month.
The old law was among the most restrictive in Europe, allowing the procedure in the first 12 weeks of pregnancy only if a mother's health was at risk. In cases of rape, it was permitted through the 16th week. Only if abortion was the only way to save a pregnant woman's life was there a time restriction.
The government hopes the new law will put an end to dangerous backstreet abortions. Women's rights groups say about 10,000 women in Portugal are hospitalized every year with complications arising from botched, illegal abortions.
The new law will set no restrictions on women seeking to end their pregnancies up to the 10th week, though it does require a mandatory three-day reflection period before an abortion is performed.
The president's statement, posted on the head of state's official Web site, included a message to Parliament in which he urged lawmakers to adopt further safeguards that would ensure there is no sharp rise in abortions.
Cavaco Silva said pregnant women must be informed about the possibility of their child being adopted and be counselled about the possible health consequences of an abortion.
He also recommended that the child's father be allowed to attend the mother's counselling sessions, even though the final decision would remain with the mother.
He said authorities must ensure comprehensive and regular inspections of private clinics licensed to perform abortions and recommended a prohibition on advertising that could be seen as encouraging abortion.
Furthermore, the government should improve sex education and family planning policies as well as carry out evaluations of how well the law is being enacted.
Neither the government nor church officials had immediate reactions to the president's ratification.
Malaysia needs Russia's assistance in maintaining and repairing Su-30MKM fighter jets
Japanese Prime Minister Shinzo Abe said that US army bases will not appear on the southern Kuril Islands in the even Russia delivers them to Japan