Ambassador Lamia Radi joined the mourners for 28-year-old Maren Ueland, including Norway's health minister and several dozen students from the University of Southeastern Norway, where the two women studied.
The church service took place in the southeast town of Time.
During the service, Radi denounced the “barbary” and “ignominy” of the killings, and read aloud messages from Moroccan people expressing their sadness.
“Morocco wanted to be present today to express first its solidarity, to share the sorrow of the family,” she told Norway's TV2 ahead of the ceremony.
“At the same time, (we want) to make it very clear that we strongly condemn the horrible murders of those innocent girls,” she said.
Moroccan authorities have said that Ueland was killed together with 24-year-old Louisa Vesterager Jespersen of Denmark in a “terrorist act”.
They were attacked as they camped overnight Dec 16-17 at an isolated hiking spot in the High Atlas mountains. Their bodies were found the following day, beheaded.
Moroccan authorities have arrested a total of 22 people in connection with the murders.
They include four main suspects and a Spanish-Swiss man who had links to some of the suspects and who subscribed to “extremist ideology”, Moroccan officials say.
The main suspects belonged to a cell inspired by Islamic State group ideology, but none of the four had contact with IS members in Syria or Iraq, Morocco's counter-terror chief Abdelhak Khiam told AFP.
Jespersen's funeral was held on January 12 in Denmark.