Dortmund police said Thursday they were pressing charges against a woman who filmed her neighbor attempting suicide.

Police rarely report on cases involving suicide but decided to make an example of the situation to highlight a growing problem.

"We point out once more - refrain from making images of helpless and or injured people! If you were in this situation, you would not want that either," Dortmund police said in a statement.

The police and fire brigade were responding to a suicidal person in the city center on Tuesday when they encountered the neighbor, the statement said. The person was threatening to jump from their balcony.

As authorities tried to convince the individual not to jump, a neighbor filmed the person on the ledge "in detail."

The suicidal person was rescued and taken to hospital but police then turned their attention towards the neighbor.

They confiscated her camera and filed a criminal complaint against her.

The woman had violated a law that specifically prohibits filming people in vulnerable situations.

Two years in jail

Read: Things to know about Germany's recent surveillance laws

Read: German police hunt sunbather drone perverts in Munich

The law makes it a criminal offense, punishable by up to two years in prison, for anyone who illegally creates or transmits an image which exposes the helplessness of another person, thereby infringing the highly personal sphere of life of the depicted person. There are however some exceptions for legitimate purposes, including news reports.

The law was first created in 2004 and strengthened further ten years later, in 2014, by the Bundestag.

The law, sometimes known as the "paparazzi paragraph," was criticized by media lawyers for its possible application in the case of undercover journalism.

Last year a photographer was charged under the law for taking photos of a person's smoldering house after a fire in the Baden-Württemberg town of Schwäbisch Hall, local broadcaster SWR reported.

Suicide videos circulate online

Read: German police probe claims onlookers encouraged migrant boy suicide

Earlier this month in the North Rhine-Westphalia town of Hamm, a 17-year-old jumped to their death from a shopping center roof in front of a gathered crowd, local daily Westfälische Anzeiger reported.

Videos and images of the suicide circulated online afterwards and were viewed by thousands of people. As a result, police filed at least one criminal complaint for violation of the law, the newspaper reported.

Police told the paper that even people reposting or forwarding such images faced punishment.

The Bundestag was expected to pass a law on Friday which would hold social media networks like Facebook and Twitter financially accountable if they fail to delete illegal content. The law was likely to cover violations of the so-called paparazzi paragraph.