The archbishop of York, John Sentamu, is to retire in June 2020, creating a vacancy for the number two position in the Church of England that many hope will be filled by a woman.

Sentamu’s retirement date will be three days before his 71st birthday. By then, he will have been archbishop of York – and a member of the House of Lords and the privy council by right – for almost 15 years.

He said: “I have decided to announce my retirement now in order to provide the Church of England with the widest possible timeframe to pray, discern with wisdom and insight, and put in place a timetable for my successor.”

Sentamu, who was born in Kampala, is the most senior black and minority ethnic (BAME) cleric in the church. He was briefly imprisoned in Uganda for speaking out against Idi Amin’s regime before fleeing to the UK in 1974.

During his time as a bishop and archbishop, Sentamu has campaigned on poverty and inequality. Earlier this year, he told the Guardian that rising inequality was a national scandal that should be addressed by a voluntary top-up tax system and a crackdown on “sinful” tax avoiders.

As bishop of Stepney, Sentamu served as an adviser on the MacPherson inquiry into the murder of the black teenager Stephen Lawrence and the police mishandling of the case. He also chaired a review of the police investigation into the death of Damilola Taylor, a 10-year-old black schoolboy who was stabbed to death in south London in 2000.

In 2007, he removed his clerical collar and cut it into pieces during an appearance on the Andrew Marr show in protest at Robert Mugabe, saying he would not replace it until the Zimbabwean president was gone. Ten years later he put a new collar round his neck in another appearance on the show, days after Mugabe was forced out.

Sentamu has been a vocal opponent of same-sex marriage, speaking against its legalisation in the House of Lords in 2013. The previous year, he said: “I don’t think it is the role of the state to define what marriage is. It is set in tradition and history and you can’t just [change it] overnight, no matter how powerful you are.”

However, he has also said he is not homophobic, and he opposes discrimination against LGBT people. “I’ve got a lot of gay friends, they see me as a friend, they see me as someone who wants to support and protect them against homophobia,” he said in 2016.

Two years ago, the archbishop was accused of misconduct by a survivor of sexual abuse. Matthew Ineson filed a formal complaint against Sentamu and four other bishops, saying they had failed to take action over his disclosure of rape by a vicar. The complaint was dismissed on the grounds of being outside a one-year time limit.

As the most senior BAME figure in the Church of England, Sentamu has often been held up as an example of progress. However, figures show that clergy are still overwhelmingly white and the proportion of BAME clergy is below that of BAME people in the general population. In 2016, the church appointed its first black bishop for 20 years.

Sentamu’s retirement comes just months after Sarah Mullally took up her new post as bishop of London, an appointment which boosted those campaigning for greater representation of women in the highest levels of the church. The bishop of London is the third most senior post in the C of E.

Mullally told the Observer that she hoped her appointment was part of a continuing process of women taking more leadership roles in the church, including archbishops when those positions become vacant. “The challenge is that people often think that, once you’ve appointed a woman, you’ve dealt with the issue. You haven’t.”

Clergy in the C of E face compulsory retirement at 70, although many continue to officiate after formally giving up their posts.

On announcing his retirement, Sentamu said: “I am deeply grateful to Her Majesty the Queen for graciously allowing me to continue as archbishop of York until June 2020 in order to enable me to complete the work to which I have been called.”