Nicaraguan lawmakers passed a tough law on Thursday (October 26) that bans abortions for rape victims and women who risk dying in childbirth in a tactical vote just days ahead of a tense presidential election. The law was approved with the support of reluctant left-wing legislators who backed it to help their party's leader Daniel Ortega, a former Cold War foe of the United States, sweep back to power in the Nov. 5 election. Nicaragua's powerful Roman Catholic church and the ruling Liberal Party had promoted the law and Ortega's Sandinista party supported it to avoid alienating church leaders and religious voters in the last days of a tight campaign. The reform proposals also included jail terms of up to 20 or 30 years for women -- and their doctors -- who terminate a pregnancy, but legislators put off a vote on that issue, meaning the current maximum sentence of six years will stand. Medical associations and women's groups had campaigned against the proposed reforms and, with the Central American country locked in a fierce debate, senior U.N. officials had called on lawmakers to think carefully before voting. Ortega, who led a 1979 revolution and fought a civil war against U.S.-backed Contra rebels throughout the 1980s, has a strong lead ahead of the Nov. 5 vote but he would face a tough run-off if he fails to win in the first round of voting. U.S. officials worry Ortega would join an anti-U.S. bloc in Latin America led by Venezuelan President Hugo Chavez and they are backing Ortega's conservative rival, Eduardo Montealegre. When Ortega was in power, his government reinforced a law giving women the right to terminate pregnancies resulting from rape or incest, or if three doctors stated a woman's life was at risk. This year, however, Ortega has refused to be drawn on the abortion law and instead pushed a vague pro-life message on the campaign trail. Twenty-five Sandinistas in the National Assembly supported the proposal on Thursday, although some sent their back-ups to cast the vote rather than do it themselves. The party's 13 other lawmakers stayed away from the session, where the law was passed in a 52-0 vote. Hundreds of people had protested outside the National Assembly in the capital Managua on Thursday, saying the law would be a death sentence for the some 400 women who suffer ectopic pregnancies in Nicaragua each year. "I don't know why there has to be a law by the Catholics in our country. Religious groups have no reason to get involved in our laws and anyway, women are having abortions clandestinely so, if they ban it, abortions are going to continue," said protester Elizabeth Duarte. The Catholic church says allowing abortion in certain cases is an "aberration", and rallied thousands to marches in favour of the change, which puts Nicaragua alongside nations like Chile and El Salvador in imposing a blanket ban. "We are preventing therapeutic abortions. We are eliminating therapeutic abortions whether anybody likes it or not", conservative lawmaker Wilfredo Navarro said. Cardinal Miguel Obando y Bravo, the influential former archbishop of Managua, recently urged voters to back candidates who were in favour of the abortion ban. Doctors came out against the law, noting that most of the world allows abortions when the mother's life is at risk. Calls for a ban on abortions in all cases became stronger after a major debate in 2003 around the case of a 9-year-old rape victim whose pregnancy was aborted.