WELLINGTON, New Zealand — They arrived in New Zealand from across the Middle East and Asia, forming a tightly bound community of Muslims whose roots stretch to the mid-19th century. In recent years, migrants came to attend universities, open restaurants or to escape wars in Syria, Afghanistan and Iraq.
It felt as if everyone knew everyone. Mosques were not for Pakistanis or Somalis or Bangladeshis, but for anyone in town.
So when a gunman stormed two mosques in the city of Christchurch during Friday Prayer, killing 49 people, the news moved quickly through New Zealand’s nearly 50,000 Muslims and the wider Islamic world.
Throughout the Middle East, Asia and Oceania, families frantically sought visas so they could race to the bed sides of the injured. And they tried to get someone in New Zealand to answer their calls.
“Nobody’s answering their phones,” said Nasreen Hanif, a spokeswoman for the Islamic Women’s Council of New Zealand, which is based in Auckland, an 85-minute flight from Christchurch.
“We don’t know if they’re at the hospital or out of reach,” she said. “Some have posted that they are safe, but others have not.”
She said one set of parents was waiting to hear from their son.
“They were supposed to have lunch with him after prayers,” she said.
Muslim leaders in New Zealand said mosques across the country, including the two that were attacked, tended to attract a multiethnic group of worshipers. Early reports suggested that those injured and killed reflected these diverse congregations.
Among the dozens recorded as missing were people from Egypt, Syria, India, Kuwait, Jordan, Afghanistan, Pakistan and Somalia, according to a site managed by the International Committee of the Red Cross.
An official from Syrian Solidarity New Zealand told a local news outlet that a father was among those killed, and one family had a child missing and another in serious condition in the hospital. “They escaped death and torture in Syria, to come to New Zealand, and be killed here,” the official, Ali Akil, said.
His brother told The News Minute, an Indian news site, that two of Mr. Jehangir’s friends were killed and that he was “struggling for his life.”
Mr. Jehangir’s family, hoping to help Mr. Jehangir’s wife and two small children, were trying to get to New Zealand as quickly as possible, the article said.
Another family in Hyderabad was waiting to hear about Farhaj Ashan, who, according to The News Minute, had last been heard from before leaving for Al Noor Mosque, one of the two where the attacks took place.
A software engineer living in Christchurch with his wife, 3-year-old daughter and 6-month-old son, Mr. Ashan had gone to New Zealand for a master’s degree at the University of Auckland in 2010, and stayed, the news site reported.
“Everyone has come back, but not my son,” Mr. Ashan’s father, Mohammad Sayeeduddin, 68, told The News Minute.
The Pakistan Association of New Zealand circulated on its Facebook page a form to be used by people looking for loved ones, asking for details like eye color and any distinguishing birthmarks or scars. The group listed six members of the Pakistani community it said were missing.
Muslim leaders across New Zealand stressed that the attacks were out of character for the country.
“Muslims have been in New Zealand for a long time, and Muslims have never had any issues in New Zealand,” said Ibrar Sheikh, the secretary of Al Mustafa Jamia Masjid, a mosque in Auckland.
“Just because one or two individuals have taken this stand, it doesn’t mean there is an attack on people living in New Zealand,” he said.
He added that the mosques attacked in Christchurch were, like most in New Zealand, “a United Nations” of ethnicities.
The first Muslims to arrive in the country were members of a British-Indian family who landed in Christchurch in 1854.
Larger-scale Muslim immigration began in the 1970s, with the arrival of families and students from the Pacific islands. The region of Canterbury, which includes Christchurch, has been an area of steady growth.
Abdullah Drury, a scholar who completed a history of Muslim migration in New Zealand two years ago, said the Muslim population in Canterbury grew enough that by 1977, a formal association could be registered and organized.
The group set up the first Muslim place of prayer on New Zealand’s South Island in Christchurch three years later.
Muslim immigration accelerated in the 1990s and 2000s with arrivals from war-torn countries like Iraq and Afghanistan.
The 2013 census counted a national population of more than 4.2 million people, including more than 46,000 people who identified as Muslim, up nearly 30 percent from 2006.
Research shows that the majority of Muslims in New Zealand are Sunni, with a large Shia minority and some Ahmadi Muslims.
Now, said Ms. Hanif of the Islamic Women’s Council of New Zealand, a close community must become even closer: Both mosques that were attacked on Friday had already reached out to ask for help with funeral arrangements.
Prime Minister Jacinda Ardern of New Zealand noted that many of the victims were immigrants.
“For many this may not have been the place they were born,” she said. “For many, New Zealand was their choice, the place that they chose to come to and committed themselves to, the place they chose to raise their families.”
Ms. Ardern said New Zealand was a haven from hatred, racism or extremism, and that is why it had become a target.
“We were chosen for the very fact that we are none of these things,” she said. “Because we represent diversity, kindness, compassion, a home for those who share our values, refuge for those who need it. Those values will not and cannot be shaken by this attack.”