New Zealand’s prime minister said she will do what she can to prevent the man accused of attacking two Christchurch mosques and killing 51 Muslim worshipers from using his upcoming trial to promote his white supremacist views.

“It’s clear that a part of this individual’s motivation is creating a platform for himself. I think that’s absolutely clear,” Prime Minister Jacinda Ardern told The Associated Press Thursday in an interview. “And I think every opportunity we can to deprive the alleged terrorist of that should be utilized.”

Ardern told the AP she was limited in what she could do but was encouraged by the pledge of New Zealand’s major media outlets to avoid promoting white supremacist ideology when covering the trial.

NEW ZEALAND COULD BAN SOME CRIMINALS FROM BEING NEAR GUNS, EVEN IF THEY DON'T OWN THEM

The prime minister also emphasized that she stood by her decision to never speak the alleged gunman’s name.

“If someone’s motivated by infamy, then you deprive them of it,” she said.

Police said Australian white supremacist Brenton Tarrant, 29, live-streamed the March 15 attacks. He has been charged with 51 counts of murder, 40 counts of attempted murder and count of terrorism and goes on trial in June.

Ardern told the AP she hoped artificial intelligence could be used to stop future attacks from being broadcast, and that everybody had a responsibility to prevent such broadcasts from continuing to happen.

THIS IS NEW ZEALAND’S DARKEST DAY’: PRIME MINISTER JACINDA ARDERN RESPONDS TO CHRISTCHURCH ATTACKS

“Even Facebook have made moves around the way that they utilize live streaming and who can access it,” she said. “In the future, I believe we can actually use AI technology increasingly.”

Ardern said in the interview that she was traveling in a van on the outskirts of the North Island town of New Plymouth when she first heard about the attacks.

“The scale of it and the magnitude of it took some time to come to grips with,” she said.

A week after the attack in a nationally televised address she delivered words that resonated around the world, “We are one.”

GET THE FOX NEWS APP

“To me, it should have been the most unextraordinary thing to say," she told the AP. “It was just my instinct around the way New Zealanders would be feeling. Yes, this was an attack, very explicitly on our Muslim community. But they were our Muslim community. I just felt that needed to be said straight away.”

The Associated Press contributed to this report.