The court agreed to the man's petition to bar the woman he impregnated from having an abortion, even though the procedure is legal in Uruguay.

The plaintiff's lawyer, Federico Arregui, told Uruguay's El Pais newspaper that the man wants to raise the child "independently of whether the mother was willing to fulfill her role."

The two are not currently in a relationship, and the woman told the court she did not want to continue the pregnancy.

Various media citing details of Thursday's ruling in the southern city of Mercedes said the decision was unprecedented in the South American country.

A 2012 law allows women in Uruguay to terminate a pregnancy during the first 12 weeks of pregnancy.

The law allows the woman to make the final decision on whether to have an abortion, but obliges her first to inform doctors of her circumstances so that they can advise her of alternatives.

The judge in the Mercedes case ruled that the woman had not fulfilled the requirement to provide that information. Reports said she plans to appeal.