Fifty victims. Twenty-six days. That — along with common-sense leadership from government officials — is what it took for New Zealand to pass a law that bans most semi-automatic weapons.

The contrast with the United States is both inescapable and striking. Despite the loss of far more lives in far more mass shootings — more than 2,000 mass shootings since the slaughter of elementary schoolchildren in Newtown, Conn., in 2012 — Congress has refused to make any significant change in federal gun law, including needed reimposition of the ban on the assault rifles that are often the weapon of choice of mass murderers.

“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 semi-automatic 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 buyback of the banned weapons moved swiftly through Parliament, passing with the support of all but one of 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 countries — even as the vast majority of Americans favor sensible gun laws — is the 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 grassroots 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 weapon ban and the general consensus was that military-style weapons were not really necessary.

Indeed, even before the ban was enacted, some owners surrendered their semi-automatic 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.”

FROM AN EDITORIAL IN THE WASHINGTON POST