The shootings that killed at least 49 people at two mosques in New Zealand on Friday have placed new scrutiny on New Zealand’s gun laws and sparked a fervent debate about whether they were a factor in the gunman’s decision to carry out his attack there.

The man was identified in court papers as Brenton Harrison Tarrant, 28, and officials have said he was an Australian citizen, which has led to comparisons between gun laws in Australia and in New Zealand.

While New Zealand’s laws governing the purchase of semiautomatic rifles are more restrictive than those in the United States, the country is much freer with firearms than Australia is, allowing most guns to be purchased without requiring them to be tracked.

“New Zealand is almost alone with the United States in not registering 96 percent of its firearms — and those are its most common firearms, the ones most used in crimes,” said Philip Alpers of GunPolicy.org, a clearinghouse for gun law data worldwide. “There are huge gaps in New Zealand law, even if some of its laws are strong.”