The man accused of killing 51 in the New Zealand mosque shootings managed to send a letter from prison, which was subsequently posted on the website 4chan, warning an “Alan” from Russia that a “great conflict” is coming.

Brenton Tarrant’s six-page document was posted on the forum earlier this week, forcing New Zealand officials to apologize for allowing the white supremacist to express his thoughts from behind bars.

"I have made myself clear that this cannot happen again," Kelvin Davis, the country’s corrections minister, said in a statement Wednesday.

His comments come as increased scrutiny is being placed on websites that allow accused killers like Tarrant to post their hateful views.

In this June 2019 courtroom drawing, Brenton Tarrant, the man accused of killing 51 people at two Christchurch mosques in March, appears via video link at the Christchurch District Court, from the maximum-security prison in Auckland where he's being held. (AP)

8CHAN OFFLINE AFTER INTERNET COMPANY PULLS SUPPORT FOR WEBSITE DESCRIBED AS 'CESSPOOL OF HATE'

Before the March 15 shootings, Tarrant, a 28-year-old Australian, posted a 74-page manifesto on the website 8chan in which he claimed immigrants were invaders who would replace the white race.

8chan, seen as a more radical offshoot of 4chan, was then 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 website.

“The El Paso shooter specifically referenced the Christchurch incident and appears to have been inspired by the largely unmoderated discussions on 8chan which glorified the previous massacre,” said Matthew Prince, the CEO of Cloudflare -- which provides services that protect against distributed denial-of-service attacks -- in a statement.

The letter from Tarrant that was posted on 4chan, which was dated July 4, 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, the Associated Press reported.

NEW ZEALAND BUYS BACK MORE THAN 10,000 FIREARMS FOLLOWING CHRISTCHURCH SHOOTINGS

Mourners lay flowers on a wall at the Botanical Gardens in Christchurch, New Zealand, in March.

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

He also 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.

Prisoners in New Zealand have rights that include the ability to send and receive mail, according to Davis. He said the prison system can withhold correspondence, and did withhold other letters Tarrant attempted to send or receive.

But "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," he added.

FDNY REVIEWS REPORTS OF EPSTEIN'S DEATH LEAKED ON 4CHAN

A New Zealand parliament member said Davis needs to demand immediate answers as to how such a 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," David Bennett, the parliament member, 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 New Zealand 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," said the department. "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."

CLICK HERE TO GET THE FOX NEWS APP

Prime Minister Jacinda Ardern, when asked about the matter, said she thinks “every New Zealander would have an expectation that this individual should not be able to share his hateful message from behind bars.”

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.

Fox News’ James Rogers and the Associated Press contributed to this report.