STOCKHOLM, Sweden — Norway’s state church, which is a version of the worldwide Lutheran tradition, has seen a record fall in membership after making it possible to join and leave the church electronically.

The Church of Norway says almost 25,000 members left in August 2016 by using a new function on the church’s website. Meanwhile, about 1,200 new members joined online.

In other words, for every one new member the Church of Norway claimed in August 2016, it lost 20.

Even though the church has seen a steady decline in membership in recent decades, that’s by far the biggest monthly loss in recorded history. By comparison, the church lost 8,588 members in the first seven months of 2016, before the online option was introduced.

Still, church officials appear to have no regrets, saying in a statement that the online function makes it possible to “clean up” the membership list.

“No one who doesn’t wish to be a member of the Church of Norway should be registered as a member,” said Kristin Gunleiksrud Raaum, leader of the church’s national council. “I’m very happy that almost 1,300 chose to join in August.”

The Church of Norway counted about 3.8 million members in 2015, about 73 percent of the population.

Like neighboring Sweden and Denmark, Norway is among the most secular countries in the world. In all three Scandinavian countries, membership in the main Lutheran church is falling, while Catholic and Islamic communities are growing, mainly due to immigration.

At the end of October, Pope Francis will travel to Sweden for an event marking the 500th anniversary of the Protestant Reformation.