BERLIN — Two German gynecologists have been fined by a Berlin judge for promoting abortion services on their website, running afoul of a Nazi-era law that makes it a crime to advertise the procedure in detail.

The law, known as 219a, was revised this year to allow doctors to state whether they offered abortions, but language that is considered to go beyond simply listing the service was still forbidden.

The ruling on Friday is the first time that a fine was handed down since the law — which was largely ignored for years — was changed. Anti-abortion activists had brought the case to the public prosecutor, according to local news reports.

Abortion is legal in Germany through the first 12 weeks of a pregnancy.

The two physicians, Bettina Gaber and Verena Weyer, who run a joint practice in Steglitz, an upscale neighborhood in West Berlin, were fined a total of 2,000 euros, about $2,250. The public prosecutor had sought a fine of €7,500. The maximum sentence is two years in prison.