“I can recall very vividly the moment I knew that we would need to be here, doing what we are doing right now,” New Zealand Prime Minister Jacinda Ardern said Wednesday as Parliament voted to outlaw military-style semiautomatic weapons and assault rifles. Attacks on two mosques in Christchurch by a white nationalist on March 15 had killed 50 people and, she said, “I could not fathom how weapons that could cause such destruction and large-scale death could have been obtained legally in this country.” She put a temporary ban in place just days after the terrorist killings. Legislation to make the ban permanent and authorize a buy-back of the banned weapons moved swiftly through Parliament, passing with the support of all but one of the 120 lawmakers.

New Zealand’s form of government makes it easier for the ruling party to pass legislation. There also is no constitutional right to own guns, as exists in the United States with the Second Amendment. But the most significant difference between the two countries — even as the vast majority of Americans favor sensible gun laws — is the outsize and malign influence of the National Rifle Association.

There have been some encouraging signs that the gun lobby’s control over lawmakers may be waning in the face of growing effectiveness of grass-roots movements for gun safety. Hopefully, the resolve shown by New Zealand will serve as a model. It is notable, for example, that the government there consulted with the country’s hunting and rural communities about the impact of an assault-weapons ban and the general consensus was that military-style weapons were not really necessary. Indeed, even before the ban was enacted, some gun owners surrendered their semiautomatic weapons. Tweeted one farmer: “Until today I was one of the New Zealanders who owned a semi-automatic rifle. On the farm, they are a useful tool in some circumstances, but my convenience doesn’t outweigh the risk of misuse. We don’t need these in our country.”