COPENHAGEN — Two are barely teenagers. The oldest is beyond retirement age. But all three are among 14 people in Denmark who have been charged with unlawfully sharing a graphic video online of the killing of a young woman in Morocco late last year.

The charges follow an investigation into 118 police reports of the unlawful sharing of a video that depicted the death of either Louisa Vestager Jespersen, 24, of Denmark or her friend Maren Ueland, 28, of Norway. It is unclear which woman was seen in the footage.

“The 14 people are accused of violating the penal code by sharing the video — usually via Facebook Messenger or other social networks,” Michael Kjeldgaard, the police chief of East Jutland, said in a statement.

In December last year, Ms. Jespersen and Ms. Ueland were hiking in Morocco’s Atlas Mountains when they were attacked and killed by a group of men who have pledged allegiance to the Islamic State group.