A teenager has been arrested by police in Morocco on suspicion of praising terrorism after he allegedly celebrated an attack that left dozens of Muslims attending prayers dead in the New Zealand city of Christchurch, the country's state-run news agency said Saturday.

Morocco’s General Directorate for National Security detained a 19-year-old student at the Institute of Applied Technology who posted to his Facebook account a message celebrating the shootings that targeted two mosques during the midday prayers and killed 49 people and wounded 48.

The detainee is set to appear before the Central Bureau of Judicial Investigations to be questioned over the charges he faces.

Mohammed VI, King of Morocco, on Friday sent his condolences to Governor-General of New Zealand Patsy Reddy following the attacks he described as “racist and terrorist.”

The main suspect in the attack, Australian Brenton Tarrant, 28, appeared in Christchurch District Court Saturday in a white prison gown and handcuffs. He did not enter a plea and was remanded in custody to appear next on Apr. 5.

The suspect did, however, made a gesture with his hands that has been interpreted as a white supremacist salute.

Prime Minister Jacinda Ardern said, “the man is currently facing one count of murder but obviously there will be further charges laid.”

Two other people are being investigated over the attacks. The three held were not on any New Zealand or Australian terror watchlists and were not known to police.

The Australian suspect, who livestreamed the attack on social media, “has traveled around the world with sporadic periods of time spent in New Zealand.

He was not a resident of Christchurch. In fact, he was currently based in Dunedin (a coastal city south of Christchurch) at the time of this event,” the prime minister said.

Thirty-nine people, ranging from children to the elderly, were still being treated in Christchurch hospital with 11 in the intensive care unit in critical condition, chief of surgery Greg Robertson said Saturday.

Many people will require multiple surgeries, he said.

Ardern on Saturday visited a refugee and migrant center in Christchurch as thousands of people across the country laid flowers at mosques and attended vigils.

Many families still await news of their missing loved ones.

The prime minister said authorities were working to remove the bodies from the mosques by the end of the Saturday.

Specialists were working alongside local staff to begin returning the victims to their “loved ones in a way that is consistent with Muslim faith while taking into account these unprecedented circumstances and the obligations to the coroner,” she added.