The singer Sabrina Carpenter danced through Annunciation of the Blessed Virgin Mary Church. The Diocese of Brooklyn said it was “appalled.”

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 the Annunciation of the Blessed Virgin Mary, a Catholic church in the Williamsburg neighborhood of Brooklyn.

Monsignor Jamie J. Gigantiello in his kitchen.

Monsignor Jamie J. Gigantiello was relieved of his duties on Nov. 4 after Carpenter’s video debuted on YouTube on Halloween.

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 “T.a.m.p.o.ns 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.”

Priest Punished For Sabrina Carpenter Music Video

The priest said he was told most of the video would be “filmed outside” the church.

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 Our Lady of Mount Carmel-Annunciation of the Blessed Virgin Mary Parish, of which the church is a part.

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.”

Sabrina Carpenter in her new 'Feather' music video

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 him,” he said. “We still back him.”