The embattled chaplain of the U.S. House of Representatives has won his job back just hours after sending a scalding letter to House Speaker Paul Ryan that accused a top Ryan staff aide of telling him "something like 'maybe it's time that we had a Chaplain that wasn't a Catholic.'"

Ryan, a Wisconsin Republican, forced Reverend Pat Conroy to tender his resignation last month, sparking a firestorm. Ryan has said he was dissatisfied with Conroy's pastoral care to lawmakers.

But in a statement Thursday, Ryan — himself a Catholic — reversed course.

"It is my job as speaker to do what is best for this body, and I know that this body is not well served by a protracted fight over such an important position," Ryan said.

Ryan's statement came soon after Conroy delivered a two-page letter that said he has never "heard a complaint about my ministry" as House chaplain. Instead, Conroy says top Ryan aide Jonathan Burks told him the speaker wanted his resignation, and cited a prayer last year that was potentially critical of the GOP tax bill.

"I inquired as to whether or not it was 'for cause,' and Mr. Burks mentioned something dismissively like 'maybe it's time that we had a Chaplain that wasn't a Catholic,'" Conroy wrote to Ryan in a letter that was also sent to House Minority Leader Nancy Pelosi, D-Calif.

Ryan did not directly address Conroy's explosive charge, saying, "To be clear, that decision was based on my duty to ensure that the House has the kind of pastoral services that it deserves."

Burks, in a statement released by Ryan's office, said "I strongly disagree with Father Conroy's recollection of our conversation."

Conroy also wrote that Burks mentioned a November prayer regarding the GOP tax bill that upset many Republicans.

Then, Conroy prayed for lawmakers to make sure that "there are not winners and losers under new tax laws, but benefits balanced and shared by all Americans."

Conroy told The New York Times last week that shortly afterward Ryan warned Conroy to "stay out of politics." Conroy also invited a Muslim cleric last year to give the opening prayer, a move that Democrats say may have upset GOP conservatives.

Conroy's resignation sparked an uproar last week when it became known that he was asked to quit. Catholic lawmakers such as Reps. Gerald Connolly, D-Va., and Peter King, R-N.Y., were particularly upset, especially after a Republican lawmaker, Mark Walker, R-N.C., was quoted in The Hill as saying Conroy's replacement should have a family — which would rule out Catholic priests — to better serve the needs of lawmakers.

Ryan's retreat came quickly. Congress is on vacation this week but Ryan said he would meet with Conroy early next week "so that we can move forward for the good of the whole House."

The chaplain is elected by the full House and Democrats said Ryan does not have the power to fire him.

In an appearance in Milwaukee last week, Ryan said: "This was not about politics or prayers, it was about pastoral services. And a number of our members felt like the pastoral services were not being adequately served, or offered."

But Conroy fired back, saying, "this is not the reason that Mr. Burks gave when asking for my 'resignation.'"

Conroy's resignation letter said he was offering to step down at Ryan's request, calling his seven years of House service "one of the great privileges of my life."

But on Thursday, Conroy said, 'I wish to serve the remainder of my term as House Chaplain, unless terminated 'for cause.' Please be guided accordingly."

Conroy copied New Jersey attorney Daniel Marchese on the letter. Marchese declined to comment other than to say Conroy is seeking to get his job back.

The chaplain is responsible for opening the House each day with a prayer and offering counseling to lawmakers and aides on the House side of the Capitol. Conroy is a Roman Catholic priest from the Jesuit order.