LONDON – Archbishop of Canterbury Rowan Williams announced Friday that he will step down at year’s end after a decade of leading the worldwide Anglican Communion at a time of continued controversy over the role of women and gays and lesbians in the church.

Williams, 61, said it has been a privilege to serve as head of a communion that includes the Episcopal Church in the United States. But he has decided to take up a position as master of Magdalene College at Cambridge University, a return to the world of academia in which many say the bookish cleric has always felt most at home.

“Moving on has not been an easy decision,” Williams said on his website. “During the time remaining there is much to do, and I ask your prayers and support in this period and beyond.”

His decision to resign after 10 years on the job was not completely unexpected by church watchers. His predecessor, George Carey, served for 11 years.

But it comes as the Anglican Communion wrestles with thorny issues that have bedeviled many Christian denominations. In July, for example, the Church of England is to decide whether women can serve as bishops. Some traditionalist priests and parishes have threatened to leave the church if the change goes through as expected. (Women already serve as bishops in the Episcopal Church.)

Outside Britain, Williams has had to confront the wrath of Anglicans, particularly in Africa and Asia, who disapprove of homosexuality and who have even suggested setting up a rival grouping after Episcopal dioceses in the United States elected openly gay and lesbian bishops, including Bishop Mary D. Glasspool in the diocese of Los Angeles. Williams’ own views on the subject have often been contorted and confusing, at least in public, as he tried to reconcile liberals and conservatives within the Anglican Communion.

At home, the Church of England is faced with ever-declining attendance in a deeply secular society. Only a small fraction of Britons are now faithful churchgoers.

The Welsh-born Williams, a respected theologian who also writes poetry, is known to have been wearied by the constant infighting within the Anglican Communion. Although both his supporters and detractors praised him Friday for his inclination to build consensus between competing factions, his attempts often wound up pleasing no one or delayed action on pressing issues.

“He’s not the sort of person to bang heads together,” Paul Handley, editor of the Church Times, told the BBC. “That’s where the humility comes in. It’s been both his blessing and his difficulty.”

But Williams has not been afraid to wade into controversy at times, whether criticizing the British government’s economic and social policies or opposing the 2003 invasion of Iraq.

He touched off a minor stir in 2008 when he suggested that Shariah, or Islamic law, could help resolve some disputes among Muslim citizens in Britain.

Critics accused him of selling out the nation’s Christian heritage, neglecting the fact that Shariah principles are already applied in some cases, usually having to do with Muslim couples seeking to divorce.

And although he was reportedly blindsided by the Vatican’s 2009 offer of, in effect, a special niche within the Roman Catholic Church to dissenting Anglican conservatives, Williams developed warm ties with Pope Benedict XVI. He visited and prayed with the pontiff last weekend in Rome.

With his bushy white eyebrows and beard, Williams is an instantly recognized figure in Britain and in many parts of the Anglican Communion, which boasts more than 80 million followers. But his international exposure shot up exponentially last year when he performed the royal wedding of Prince William and Kate Middleton.

After announcing his intention to step down Friday, Williams said that his successor would need the “constitution of an ox and the skin of a rhinoceros.”