The country's police commissioner Mike Bush confirmed the total, while prime minister Jacinda Ardern earlier said at least 20 others had been seriously injured.
Ardern described it as "one of New Zealand's darkest days" and said the events in the city of Christchurch represented "an extraordinary and unprecedented act of violence".
Ms Ardern at her news conference alluded to anti-immigrant sentiment as the possible motive, saying that while many people affected by the shootings may be migrants or refugees "they have chosen to make New Zealand their home, and it is their home. They are us. The person who has perpetuated this violence against us is not".
Three men and one woman were taken into custody, Police Commissioner Mike Bush said.
He said police had defused a number of improvised explosive devices found on vehicles after the shootings.
A man who claimed responsibility for the shootings left a 74-page anti-immigrant manifesto in which he explained who he was and his reasoning for his actions.
He said he considered it a terrorist attack.
"It's a very serious and grave situation," Mr Bush said.
Anybody who was thinking of going to a mosque anywhere in New Zealand on Friday should stay put, he added.
The deadliest shooting occurred at the Masjid Al Noor mosque in central Christchurch at about 1.45pm local time.
Witness Len Peneha said he saw a man dressed in black enter the mosque and then heard dozens of shots, followed by people running from the mosque in terror.
Mr Peneha, who lives next door to the mosque, said the gunman ran out of the mosque, dropped what appeared to be a semi-automatic weapon in his drive, and fled.
Mr Peneha said he then went into the mosque to try to help.
"I saw dead people everywhere. There were three in the hallway, at the door leading into the mosque, and people inside the mosque," he said.
"I don't understand how anyone could do this to these people, to anyone. It's ridiculous."
He said he helped about five people recover in his home. He said one was slightly injured.
"I've lived next door to this mosque for about five years and the people are great, they're very friendly," he said. "I just don't understand it."
He said the gunman was white and was wearing a helmet with some kind of device on top, giving him a military-type appearance.
Police said there was a second shooting at the Linwood Masjid Mosque.
Mark Nichols told the New Zealand Herald he heard about five gunshots and that a Friday prayer-goer returned fire with a rifle or shotgun.
Mr Nichols said he saw two injured people being carried out on stretchers past his automotive shop and that both people appeared to be alive.
Foreign Secretary Jeremy Hunt has said the UK "stands with" New Zealand after multiple people were killed in shootings at two mosques in Christchurch.
He tweeted: "Our hearts go out to the people of New Zealand following the news of this terrible act in Christchurch. NZ is one of the most peaceful, peace-loving and generous nations in the world. Your friends in the UK stand with you today in deepest sympathy."
Police have urged people nearby to stay indoors.
New Zealand Police tweeted: "In response to a serious ongoing firearms incident in Christchurch all Christchurch schools have been placed into lockdown."