An online warning. A live-streamed video. A hate-filled manifesto.

These digital clues emerged in the wake of two mass shootings at mosques in New Zealand on Friday. Although they have not been publicly confirmed by authorities, they point to white-supremacist, anti-Muslim beliefs as the apparent motive for the attacks.

Hours after the bloodshed, New Zealand police announced they had three men and one woman in custody. They did not release any names and did not speculate on a motive.

They did, however, say they were aware of “distressing footage” posted online that was related to the ambushes at the Masjid Al Noor and the Linwood Islamic Centre during Friday prayers.

The footage was live-streamed on Facebook. The shooter appeared to advertise the attack in advance, warning of a shooting on the far-right-friendly forum 8chan, and linking to the Facebook account and the so-called manifesto. The man behind the Facebook account appears to be Australian. The Daily Beast is not releasing the name because it has not been confirmed by authorities.

The 8chan poster appeared to have created several social-media accounts in recent weeks to promote himself and the manifesto, some of which appear to be sarcastic. White-supremacist terrorists sometimes release racist manifestos in concert with violent attacks to amplify their beliefs.

He used the Facebook account to stream a 17-minute video of him opening fire inside a Christchurch mosque. At one point, he left the building and returned to the car for a new gun, before going back to the mosque and resuming the massacre.

8chan users cheered the attack online, with one replying to the original post with a picture of a man saluting. As gruesome clips of the shooting circulated on social media, Facebook, Reddit, and Twitter deleted links to the video—and the poster’s Twitter profile was deactivated.

Based on the postings, the shooting appears to have been motivated by anger over Muslim immigration. In the 8chan post, Muslims are described as “invaders.” The manifesto is filled with anger toward Muslims and claims that Muslim immigration would lead to “white genocide.”

The alleged shooter referenced an ideological jumble of right-wing personalities in the manifesto. Some of those cultural references appeared to be ironic, or a ploy for attention. At one point, the author mentioned carrying out the attack with guns to gain American attention and to sow political discord. He decorated those guns with neo-Nazi symbols and names of past killers and crusaders.

The writer appeared deeply familiar with the far-right internet, which he said influenced his thinking.

In the 8chan post, he wrote that it’s time to stop “shitposting” on the board and make a “real life effort post.” In the manifesto, the writer said he got all of his beliefs from the internet, because “you will not find the truth anywhere else.”

The manifesto is riddled with references to 4Chan memes, and urges people who agree with the shooting to make more memes. At one point, the writer describes himself as a “kebab removalist,” a reference to a 4Chan meme about Serbian attacks on Bosnian Muslims. (Video the alleged shooter posted from a car includes a song in the background “known as a marching anthem for Serbian nationalist paramilitary units,” the BBC reported, and praises former Bosnian Serb leader Radovan Karadzic, who was convicted of genocide and war crimes.)

“Create memes, post memes, and spread memes,” the author wrote. “Memes have done more for the ethno-nationalist movement than any manifesto.”

Other elements of the text appeared more earnest in their references to white-supremacist terror. The writer praised the perpetrators of other racist attacks, including Charleston church shooter Dylann Roof and Anders Behring Breivik, the Norwegian man who killed 77 people in 2011 in an attack inspired by his anger over immigration.

The author wrote that Breivik gave him “true inspiration.” Breivik was also recently cited as the alleged inspiration for Christopher Hasson, the Coast Guard lieutenant accused of stockpiling weapons and creating a hit list of prominent Democrats and media figures.

The post was also filled with references to white supremacists. The 8chan poster connected to the attack posted a picture on Twitter of a bag with the “Sonnenrad” symbol, which is frequently used by neo-Nazis. In the manifesto, the author said the attack was motivated by the “14 Words,” a white-supremacist slogan.

-- Adam Rawnsley contributed to this report