On Halloween, the pop star Sabrina Carpenter uploaded a music video to YouTube for her new song “Feather.” That was a Tuesday. By the end of the week, a Catholic priest had been stripped of his administrative duties because of it.

In the video, Ms. Carpenter, 24, a former Disney child star with more than 31 million followers on Instagram, dances through Our Lady of Mount Carmel-Annunciation Parish, a Catholic church in the Williamsburg neighborhood of Brooklyn. Dressed in a short black tulle dress and veil, she makes her way up the center aisle, onto the altar, which is lined with pastel-colored coffins, and then back down the aisle and out the front door. In another scene, she appears to be splattered with blood after a fight scene in a gym. In another, two young men are reading a book called “Tampons Should Be Free.”

The video has been viewed more than 9.7 million times, and led to an outcry on social media.

The Diocese of Brooklyn denounced the video in a statement to the Catholic News Agency, saying it was “appalled at what was filmed.”

The church’s pastor, Msgr. Jamie J. Gigantiello, gave Ms. Carpenter’s team permission for the filming, but the diocese said that he had not followed “diocesan policy regarding the filming on Church property, which includes a review of the scenes and script.” The story was first reported by Mark Irons, a reporter at the Catholic news outlet EWTN, on X, the social media site formerly known as Twitter.

In response to the video, Bishop Robert J. Brennan celebrated a Mass of Reparation, which the diocese said “restored the sanctity of this church and repaired the harm.”

Not long afterward, Bishop Brennan relieved Monsignor Gigantiello of his administrative oversight of the parish.

The pastor has since apologized to parishioners in a post on the church’s Facebook page. He acknowledged that the video crew had approached him in September about filming a music video for Ms. Carpenter in and around the church. After a search online to learn more about the singer “did not reveal anything questionable,” he said he approved the project, citing an “effort to further strengthen the bonds between the young creative artists who make up a large part of this community.”

In an email, Monsignor Gigantiello said that he had been told that the video would feature a funeral scene but that the final edit was “not what was initially presented to me.” The video’s director did not answer multiple requests for comment.

Monsignor Gigantiello said the last few weeks have been difficult for him, the parish and the diocese, adding, “I am genuinely sorry and I deeply regret the incident that took place and any distress that my actions may have caused.”

Those who attended the Mass of Reparation were “visibly upset by what had been filmed inside their church,” John Quaglione, a press secretary for the diocese, said in an email. He estimated that there were about 50 people there.

But other Catholics — in interviews and on social media — characterized the punishment as overly harsh.

“The church ought to have been monitored, but Monsignor is a good man,” said Thomas Casale, a former parishioner. “I’m sure the majority of people will forgive him or don’t blame him.”

Louis Barricelli Jr., a third-generation parishioner, agreed. “The punishment did not fit the crime,” he said. Mr. Barricelli estimated that about 40 members of the priest’s former parishes came to show support at Nov. 19’s 10 a.m. Mass, which Monsignor Gigantiello celebrated. “We still love,” he said. “We still back him.”

Ms. Carpenter, the pop star, came to fame in the early 2010s, while starring in Disney Channel’s “Girl Meets World,” a spinoff series of the 1990s sitcom “Boy Meets World.” When she was 14, she was signed by Hollywood Records, before moving to Island Records in 2021. She has headlined four tours, including stops in Europe and Asia. Her sound is a mix of pop and R&B, with occasional ballads, and popular songs include “Nonsense” and “On My Way.”

The use of Catholic imagery in pop culture — from photography to the Met Gala and music videos — is not new. Madonna, in her 1989 music video for “Like a Prayer,” kneels at the feet of a statue, which brings the Catholic saint to life, and the two kiss in front of a burning cross. Unlike Ms. Carpenter’s video, Madonna’s was shot in a studio, not an operating church.

Ms. Carpenter, who performs the opening act for parts of Taylor Swift’s “Eras” tour, often covers Madonna’s music in her live performances.

Catholic imagery is employed in popular culture more than other Christian sects because its churches have a recognizable visual style that viewers instantly associate with sacredness, said Kathryn Reklis, an associate professor of theology at Fordham University. “An unadorned Methodist church or a storefront Pentecostal church just don’t.”

As for the church in Brooklyn, the diocese said a more thorough investigation will be made into the approval process in the coming weeks.