Portugal, a traditionally Roman Catholic country, is therefore set to join most European countries in allowing abortions. Malta, Ireland and Poland still have highly restrictive abortion laws.
The new law will set no restrictions on women seeking abortion up to the tenth week of pregnancy.
However, a mandatory three-day reflection period is required before an abortion is performed.
Though he gave his formal consent to the new law, Cavaco Silva described abortion as "a social evil to be avoided".
He said the law should carry conditions to ensure that women are properly informed of the consequences of abortion through a compulsory medical appointment.
The attendance of the biological father at the woman's medical appointment would be of importance, as well as the woman being told about any alternative, such as giving up a child for adoption.
Portugal's socialist government now has 60 days to regulate the law before it can be implemented.
Jose Socrates, Portugal's prime minister, has made the abortion law a priority since his party took power two years ago.
He described the old abortion law as "backward" and "a national disgrace".
The Roman Catholic church has campaigned strongly against change.
There are an estimated 23,000 clandestine abortions every year in Portugal, a number the government hopes to reduce substantially.
"After the law is implemented, it should be monitored to evaluate whether it effectively reduces not only the number of clandestine abortions but also the number of abortions in general," the presidency said.
The old law allowed 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 until 16 weeks.