New Zealand officials admitted Wednesday that they made a mistake by allowing the man accused of killing 51 people at two Christchurch mosques to send a hand-written letter from his prison cell.

The six-page letter from Brenton Tarrant was posted this week on the website 4chan, which has become notorious as a place for white supremacists to post their views. And it comes at a sensitive time, with other alleged killers from El Paso to Norway citing Tarrant as an inspiration.

The letter appears to be written in pencil on a small notepad and is addressed to “Alan” in Russia. Much of it appears to be relatively innocuous, discussing a one-month trip Tarrant says he took to Russia in 2015. But the letter also warns that a “great conflict” is coming and uses language that could be construed as a call to arms.

Story continues below advertisement

Corrections Minister Kelvin Davis said in statement that he didn’t believe the prison system should have allowed Tarrant to send the letter.

“I have made myself clear that this cannot happen again,” Davis said.

But Davis also said that all New Zealand prisoners have rights that include the ability to send and receive mail. He said the prison system can withhold correspondence and withheld some other letters Tarrant had attempted to send or receive.

WATCH: Accused New Zealand mosque shooter charged with terrorism

1:04 Accused New Zealand mosque shooter charged with terrorism Accused New Zealand mosque shooter charged with terrorism

“We have never had to manage a prisoner like this before – and I have asked questions around whether our laws are now fit for purpose and asked for advice on what changes we may now need to make,” Davis said.

Story continues below advertisement

In the letter, dated July 4, Tarrant thanks “Alan” for postage stamps he apparently sent, saying they’re the only two pieces of colour in an otherwise gray cell and adds that he’ll have to hide them from the guards.

Tarrant cites Plato and other philosophers and writers as inspiration for his views, and says he “cannot go into any great detail about regrets or feelings as the guards will confiscate my letter if I do” and use it as evidence.

READ MORE: New Zealand begins inquiry into Christchurch mosque shooting

Opposition spokesman David Bennett said Davis needed to demand immediate answers as to how an inflammatory letter could be sent from inside a maximum security prison.

“This man is accused of carrying out one of the most heinous crimes in New Zealand history,” Bennett said in a statement. “New Zealanders will be horrified that Corrections allowed him to send a letter which includes a call to action and has subsequently been posted online.”

The Corrections Department, which oversees prisons, said the law only allows a prison director to withhold a prisoner’s mail in a “very limited” range of circumstances.

“On review, we acknowledge that this letter should have been withheld,” the department said in a statement. “We have made changes to the management of this prisoner’s mail to ensure that our robust processes are as effective as we need them to be.”

Story continues below advertisement

READ MORE: Man who shared video of Christchurch shooting sentenced to 21 months in prison

Before the March 15 shootings, Tarrant, a 28-year-old Australian white supremacist, posted a 74-page manifesto on the website 8chan in which he outlined his racist views and his beliefs that immigrants were invaders who would replace the white race.

8chan, seen as a more radical offshoot of 4chan, was effectively knocked offline this month after two companies cut off vital technical services in response to claims that the gunman who killed 22 people at a Walmart in El Paso, Texas, posted a racist anti-Latino screed on the site just before the Aug. 3 killings.

Like the Texas gunman, a Norwegian man suspected of killing his stepsister and then storming an Oslo mosque with guns this month is also believed to have found inspiration in Tarrant’s actions.

WATCH: Plans for gun megastore in Christchurch angers community

1:05 Plans for gun megastore in Christchurch angers community Plans for gun megastore in Christchurch angers community

New Zealand Prime Minister Jacinda Ardern has vowed never to utter Tarrant’s name in order to deny him the publicity she says he craves, making Tarrant’s letter even more of an embarrassment for the government.

Story continues below advertisement

“I think every New Zealander would have an expectation that this individual should not be able to share his hateful message from behind bars,” she told media on the island nation of Tuvalu, where she is travelling to attend a meeting of Pacific leaders.

It’s not the first misstep by New Zealand authorities in the case. Police initially filed a single representative murder charge against Tarrant but mistakenly named somebody who was still alive before later amending the charge.

Tarrant has pleaded not guilty to terrorism, murder and attempted murder charges following the mosque attacks. He remains in jail ahead of his trial, which has been scheduled for next May.