The Very Rev. Samuel T. Lloyd III, who arrived at the Washington National Cathedral six years ago with a promise of establishing a voice of moderation in the public discourse but who ended up spending much of his time dealing with economic difficulties, announced Friday that he is resigning as dean of the church.

Lloyd, 61, will return to Boston’s Trinity Church, where he worked for almost 12 years. Succeeding him at the cathedral will be the Right Rev. John Bryson Chane, bishop of the Episcopal Diocese of Washington, who will serve as interim dean after Lloyd’s departure Sept. 18.

“My decision to leave was simply a decision of vocation,” Lloyd said Friday. “I’ve had the enormous privilege and challenge of leading the National Cathedral through some very exciting years, and now I felt it’s time to return to my basic vocation, which is as a parish priest, preaching, teaching and leading a parish.”

Throughout a tumultuous tenure marked by unanticipated financial cutbacks and unpopular layoffs, Lloyd also initiated numerous summits and forums on topics such as global poverty and women in the developing world. He established a regular Sunday congregation, now 1,000 members, and was praised by James Wind, chair of the church’s governing board, as “one of our country’s finest preachers.”

Lloyd also tried to instill a “generous-spirited Christianity,” in one of his favorite phrases, in the congregation as he bolstered the cathedral’s role as the symbolic gathering place for the nation, visited by nearly 400,000 people annually and by every U.S. president since Theodore Roosevelt laid its foundation stone.

But after his first three years of rapid expansion, Lloyd and the church confronted the 2008 economic slowdown. Faced with a rapidly dwindling budget and endowment, he instituted several budget cuts, reducing the 104-year-old church’s staff from 170 to 70 and slashing its spending from $27­ million to about $13 million.

The church closed its popular greenhouse; reduced choir performances, lectures and classes; and outsourced its gift shop. It even hinted that it might sell its rare-book collection to the Folger Shakespeare Library, although in the end it did not.

His colleagues noted that Lloyd has led the organization back to firmer financial footing in the past two years, balancing its budget and returning its endowment, which had fallen by 25­ percent, to $67.6 million. He also ushered through a new strategic plan that lays out how to move forward and positioned the church for a new capital campaign.

“He’s done a great deal for this cathedral,” Chane said. “He inherited a significant financial challenge, and I mean significant. We now have a balanced operating budget. The inner workings of the staff are very solid. We have a very, very competent chief operating officer and worship staff, along with his other accomplishments supporting the work of the cathedral in its interfaith mission.”

A search for a new dean will not begin until at least December, Chane said.