A pedophile priest who was defrocked in New Jersey after admitting abusing a dozen children has died in a nursing home, the diocese confirmed to The Post.

James Hanley — who abused young parishioners in Mendham and Pompton Plains over the course of 14 years — died last week, the diocese’s attorney, Kenneth Mullaney, confirmed.

Relatives of the disgraced former priest alerted church officials last week to the death. The nursing home was not identified.

His family did not reveal the cause of death — including whether it was connected to the coronavirus pandemic that has devastated many nursing homes in the Garden State, Mullaney said.

Even though Hanley had been defrocked in 2003 after admitting his abuse — and leaving the church to pay almost $5 million in settlements — he was still getting a “small” stipend from the church, Mullaney said.

Hanley, the pastor at St. Joseph’s Church in Mendham for 10 years, was one of the first priests to be defrocked for sexually abusing children in the aftermath of the Roman Catholic Church scandal, NJ.com said.

He admitted in a sworn statement for a civil lawsuit that he sexually abused about a dozen child parishioners in Mendham and Pompton Plains between 1968 and 1982, NJ.com previously said.

He had been accused by numerous others of abuse, too, leading to the diocese settling with 21 of his accusers for nearly $5 million in 2004, the report says.

Just months ago, he was called a “prolific pedophile” in a lawsuit filed thanks to a new law that lifted the statute of limitations for adult survivors of child sex abuse in the state.

The accuser, identified only as “B.D.,” said Hanley “groomed boys active in the Church, including altar boys, gaining their trust and testing boundaries.”

He would then give massages “as a prelude to sexual assault,” the suit stated.

B.D. says he was just 13 in or around 1968-69 when he endured abuse similar to acts Hanley admitted during the 2003 deposition — such as “touching and rubbing of genitalia, oral sex, sexual use of a vibrator, open-mouth kissing and showing pornography,” the records state.

Hanley also pleaded guilty in 2008 to jumping bail after missing a court date in an assault case, NJ.com noted.

In that case, he admitted using an aluminum bat to intimidate three employees at the Extended Stay Hotel, pleading guilty to unlawful possession of a weapon, the site says.