The most senior priest in the Roman Catholic Church in Britain has resigned over allegations of inappropriate behaviour up to 30 years ago.

Cardinal Keith O'Brien's immediate resignation comes a day after claims by three priests and a former priest emerged in a newspaper.

The 74-year-old tendered his resignation as Archbishop of St Andrews and Edinburgh in November to Pope Benedict XVI, but said in a statement today: "The Holy Father has now decided that my resignation will take effect today.

"Looking back over my years of ministry: For any good I have been able to do, I thank God. For any failures, I apologise to all whom I have offended."

Image:Cardinal O'Brien missed mass at St Mary's on Sunday

The Cardinal should have been travelling to the Vatican this week to help choose the next Pope, but he said he would not be joining the conclave.

"I do not wish media attention in Rome to be focused on me - but rather on Pope Benedict XVI and on his successor," he said.

His absence from the conclave means Britain now has no-one able to vote in the forthcoming election of the next leader of the 1.2bn Roman Catholics worldwide.

The Cardinal missed traditional mass at his main cathedral, St Mary's in Edinburgh, on Sunday after The Observer newspaper published the allegations dating back to the 1980s.

The report said the three priests and the former priest in Scotland reported the cardinal to the Vatican over allegations of "inappropriate behaviour".

The Observer said the four statements containing the claims were submitted to the Papal Nuncio Antonio Mennini's office the week before Benedict's resignation was announced on February 11.

It is understood that Cardinal O'Brien contests the claims.

In his resignation statement, Cardinal O'Brien said he had previously offered to step down but it has only been accepted now.

The cleric had been expected to quit on March 17 - the date of his 75th birthday.

Cardinals older than 75 are not allowed to vote in the conclave, which is expected to take place in the next three weeks.

Cardinal O'Brien is no stranger to making the news with his views.

Last week, he called for the Catholic Church to end its celibacy rule for the priesthood.

He had told the BBC: "I realise that many priests have found it very difficult to cope with celibacy as they lived out their priesthood, and felt the need of a companion, of a woman, to whom they could get married and raise a family of their own."

He has also been an outspoken opponent of plans to legalise same-sex marriage.

Last year his stance landed him the award, Bigot of the Year, from the gay rights group Stonewall.

In 2007 he caused controversy when speaking on the 40th anniversary of the Abortion Act.

He said the termination rate north of the border was equivalent to "two Dunblane massacres a day".