A right-wing extremist armed with semi-automatic weapons rampaged through two mosques in the city of Christchurch during afternoon prayers on Friday, killing 49 worshippers and wounding dozens more.

A visitor believed to be the 28-year-old Australian -- who has been arrested and charged with murder in New Zealand -- "visited Turkey several times and stayed for a long period in the country," the Turkish official said without giving dates.

"We think that the suspect could have been to other countries (from Turkey) in Europe, Asia and Africa. We are investigating the suspect's movements and contacts in the countries," added the official, speaking on condition of anonymity.

Turkish media reported that a manifesto published online allegedly by the gunman contained specific references to Turkey and ridding the famed Hagia Sophia in Istanbul of its minarets. Now a museum, the building was once a church before being turned into a mosque during the Ottoman empire.

Sofia earlier said it too was investigating after discovering that the gunman might have visited Bulgaria in November 2018.

A man believed to be him spent a week in the country supposedly to "visit historical sites and study the history of the Balkan country," Bulgaria's chief prosecutor Sotir Tsatsarov said.

He said the inquiry would establish if this was "correct or if he had other objectives".

The same man also made a short visit to the Balkans in December 2016, travelling by bus across Serbia, Croatia, Montenegro and Bosnia and Herzegovina.