Australian Brenton Tarrant is believed to be behind a 74-page "manifesto" saying he carried out the shootings at Christchurch mosques which killed at least 40 people to avenge the deaths of thousands in Europe.
Tarrant, whose identity was confirmed by authorities in Australia, prepared his manifesto titled "The Great Replacement" and posted it on a message board website.
He describes himself as "Just an ordinary White man, 28 years old. Born in Australia to a working class, low income family".
Tarrant said he had a regular childhood but had little interest in education and has recently worked as a "kebab removalist".
Under a heading "Why did you carry out the attack?", he says it was to avenge "thousands of deaths caused by foreign invaders."
Under another heading entitled "What are your wishes??", he quotes a white nationalist slogan "the 14 words".
"To most of all show the invaders that our lands will never be their lands, our homelands are our own and that, as long as a white man still lives, they will NEVER conquer our lands and they will never replace our people," he writes.
"To take revenge on the invaders for the hundreds of thousands of deaths caused by foreign invaders in European lands throughout history.
"To take revenge for the enslavement of millions of Europeans taken from their lands by the Islamic slavers.
"To take revenge for the thousands of European lives lost to terror attacks throughout European lands.
"To directly reduce immigration rates to European lands by intimidating and physically removing the invaders themselves.
"To incite violence, retaliation and further divide between the European people and the invaders currently occupying European soil.
"To avenge those European men and women lost in the constant and never ending wars of European history who died for their lands, died for their people only to have their lands given away to any foreign scum that bother to show up."
A video has also been posted on social media of the gunman arming himself, leaving his car and walking into the mosque where he opens fire, killing multiple people.