NEW BEDFORD — For four decades, Lee Carreiro taught catechism classes at St. John the Baptist Church, helping to prepare generations of children for their First Communion in a parish that says it is the first Portuguese Catholic Church in North America.

On Sunday, she was one of the hundreds of parishioners who attended what was probably the church’s final Mass, a highly emotional service in which the pastor fought back tears from the pulpit.

“It’s a sad moment,” said Carreiro, 78, who wore a medal honoring her years of service to the church pinned to her white sweater. “There are many other churches that have closed, but this one has the distinction of being the first Portuguese parish. . . . [But] we move on, and it’s all part of acceptance.”

The Rev. John John J. Oliveira, pastor of St. John, delivered his homily in English and Portuguese and urged parishioners to continue to be strong in their faith even though the church many of them grew up in is closing. It was established in 1871. “Thank you for coming here today,” Oliveira told the congregation, his voice breaking. “Thank you for being with us. May the Lord give you his peace.”

As he spoke, some in the near-capacity gathering of about 600 cried, hugged, or patted one another on the shoulder.

“I can’t believe I’m walking out of this church for the last time,” said Lenea Correia, 57, of New Bedford, after the conclusion of the Mass.

She had been a parishioner for 35 years, was married in the church, and had her children baptized there. “We’ll survive, I guess,” she said. “We have to.”

Sunday’s Mass was held in the granite church building that was dedicated in 1913, after the previous church was destroyed in a fire.

The current building was designed by the Boston architect Matthew Sullivan, who mixed Byzantine and Portuguese Romanesque styles to create a larger space to meet the needs of a growing immigrant population, according to an entry on the city of New Bedford’s official website.

In October 2009, Bishop George W. Coleman approved a request from a parish council to give the church until 2011 to increase membership and shore up its finances, and then granted a one-year extension, but the goals were not met, according to the diocese.

There are no immediate plans for the property, said John E. Kearns, a spokesman for the diocese. Asked whether selling the church was an option, Kearns said the diocese has not “gotten that far yet.”

Norberto Pacheco, 67, who lives next to the church, said after Mass that he is deeply saddened to see it close.

“I worked 42 years for that church, and now we close everything,” he said.

The diocese has said that parishioners from St. John the Baptist will be welcomed at Our Lady of Mount Carmel, which is less than a mile away and where Oliveira is also the pastor. Our Lady of Mount Carmel is also designated to serve the Portuguese-American community in New Bedford.

But some of St. John’s parishioners, including Fred Langevin, 62, a longtime member whose children and grandchildren were baptized there, are appealing to Coleman to reverse the decision to close the church.

And if that doesn’t work, Langevin said, the group will appeal to the Vatican.

“There’s absolutely no reason to shut us down,” Langevin said. “We need a little bit more time to raise capital funds to fix the roof.”

In a letter to parishioners in March, Coleman wrote that parish debt had been reduced to $205,000, a $45,000 decrease from October 2009. By mid-2011, Coleman wrote, the church had received $300,000 in pledges for a capital campaign with a stated goal of $750,000, and $129,000 collected. Parishioner participation stood at 17 percent.

All funds that were collected will be returned to the donors, according to the diocese.

“Please know that you have been in my prayers, and will continue to be so,” Coleman wrote in March. “Together, may we build a stronger Church and help to create a future of hope.”

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.