VATICAN CITY (Reuters) - A Nigerian bishop whom Pope Francis had fiercely defended has resigned after a five-year, sometimes violent, standoff with rebel priests and faithful who rejected him as an ethnic outsider, the Vatican said on Monday.

FILE PHOTO - Pope Francis leaves at the end of the Ash Wednesday mass at Santa Sabina Basilica in Rome, Italy, February 14, 2018. REUTERS/Alberto Lingria

The case of the Vatican versus the people of the diocese of Ahiara in southwestern Nigeria had become a rare battle of wills that tested the power of papal authority and could set a precedent for future appointments.

A Vatican statement said the pope had accepted the resignation of Peter Ebere Okpaleke as bishop of the diocese of Ahiara. It said the position had been declared vacant and that a papal administrator would run it for the time being.

Many priests and faithful had refused to swear allegiance to Okpaleke because he is not from Mbaise, a heavily Catholic area in southwestern Nigeria made up of an amalgam of indigenous clans connected by intermarriage.

Okpaleke was appointed bishop by then-pope Benedict in 2012, but the protests prevented him from ever taking over the diocese. His installation ceremony took place in another area of Nigeria because the doors of the Ahiara cathedral were locked so the bishop could not enter.

The situation came to a head last June when Francis demanded that all priests in the diocese write him a letter within 30 days pledging their obedience to and accepting Okpaleke as their bishop because he was appointed by a pope.

Those who did not write such a letter would face suspension from the priesthood, the pope told them at the time. Francis also demanded that the rebellious priests write a letter of apology to Okpaleke.

Fides, the Vatican’s missionary news agency, on Monday published excerpts from Okpaleke’s resignation letter, saying he had not been able to take possession of diocese or even live within its territory because of continuing “violent reaction and resistance”.

Fides said some 200 priests had written to the pope promising their obedience. But many had also told the pontiff that they had “psychological difficulty in collaborating with the bishop after years of conflict”.

The agency, which is controlled by the Vatican, said the rebellious priests should “reflect on the grave damage inflicted on the Church” through their “unreasonable actions opposing a bishop legitimately appointed by the Supreme Pontiff”.

In his resignation letter, Okpaleke said remaining bishop in would not be beneficial to the Church.