From left, Treasury Secretary Timothy Geithner, and Chairman of the Federal Reserve Ben Bernanke testify before the House Committee on Financial Services concerning the AIG bailout and President Obama's 2010 budget proposal, on Capitol Hill March 24, 2009. (melina Mara/TWP)

Treasury Secretary Timothy F. Geithner sat around a conference room table with his advisers as they relayed the concerns of banks protesting President Obama’s push for new rules for Wall Street.

Geithner, widely thought to be a friend of the financial industry, did not lend a sympathetic ear.

“F--- the banks,” he said, according to people familiar with the episode.

Geithner is set to step down Friday as Treasury secretary after four enormously consequential years as one of Obama’s top advisers — and, as that four-letter epithet suggests, a deeply paradoxical figure in American government.

Lawmakers, the news media and even some White House officials have caricatured him as a former banker, but Geithner has spent nearly his entire career in public service, and his friends note that he lives a life of unusual modesty. Former government watchdogs say he pursued generous bailouts for Wall Street and not for everyday Americans, but economists say rescuing the financial system averted another Great Depression and saved millions of jobs. Critics insist he sought to protect Wall Street’s reckless business model, but bankers and his allies alike agree he often ignored the positions of the financial industry in writing the legislation cracking down on risky behavior.

In an interview, Geithner, 51, said the gap between his public image and the reality is a consequence of the actions, which seem unfair, that must be taken to protect a country from a financial crisis.

“To save an economy from a failing financial system, you have to do things that are going to be fundamentally impossible to explain to people,” he said. “You’re going to look like you’re giving money to people who were responsible for burning down the economy.”

Geithner is leaving after six years in the limelight, first as president of the Federal Reserve Bank of New York and then as Treasury secretary. He is most associated with the financial bailouts of 2008 and 2009. But he also helped oversee passage of the Dodd-Frank rewrite of Wall Street regulations, played a key role in the White House’s rocky pursuit of a deal with Republicans to tame the national debt and worked aggressively to help stem the European financial crisis.

Over this period, aside from Federal Reserve Chairman Ben S. Bernanke, no American carried as much responsibility for the state of the national and global economy. His experience in that crucible — the most uncertain and perilous in generations — offers a glimpse into the life of a man who long believed he knew what to do in the face of crisis, even as he sometimes struggled to grapple with the political and public demands of doing it.

“Tim’s natural approach to things is very smart, but a little bit irritating at points,” said Christine Lagarde, managing director of the International Monetary Fund, who has observed Geithner’s role in Europe. “He’s very quick, and he does things very promptly. He doesn’t take no for an answer. The result of that is for people who do not operate as quickly as he does, he can be a little bit irritating.”

Geithner has faced consistent critiques about his record. During his tenure, the Fed was among the regulators that did not act aggressively enough to stem the building risks in the financial system. He faced accusations that he did not appear sympathetic to the public frustration that bailed out American International Group was paying its traders extravagant bonuses — feeding a perception of closeness with the financial industry that he has acknowledged has been “damaging” to the Obama administration. He and others in the administration failed to get enough support for passing enough measures to foster more rapid economic growth.

Geithner, who first broached the subject of stepping down in fall 2010, agreed to stay on for the remainder of the term after aggressive lobbying by Obama. Friends say he will take a year or more off, probably write a book and is unlikely to take a job on Wall Street. In an interview, Geithner said the factors that have driven him to spend a life in public service remain compelling.

“I have no idea what I’m going to do,” Geithner said. “For all my professional life, I’ve made basically one choice about what kind of work I want to do. And the reasons that led me to that are very powerful and are very enduring.”

The best possible plan

In the dark days of early 2009, when it seemed the nation’s banks could still collapse, Obama was weighing whether to side with Geithner in an internal debate over how to stabilize the financial system. The president’s political advisers wanted to harness public anger against banks and introduce punitive measures, like limiting pay. Some economic advisers wanted to seize struggling firms and turn them into wards of the state.

But Geithner, who had supported a massive bailout of the financial sector in the final months of the Bush administration, advocated a different approach, a series of tests to see if the banks could survive a greater downturn. In the Oval Office, Obama asked his little-known Treasury secretary, “This plan of yours, is it going to work?”

“I said, ‘You know, nothing is certain in life.’ ” Geithner recalled Jan. 16 in private farewell remarks at the Treasury. “But I knew that our plan was better than any and all of the alternatives before us.”

Obama went ahead, the plan worked and before too long, it became clear that most of the banks that received bailouts would pay them back, winning Geithner the president’s admiration.

“When you go through that kind of crisis together and come out the other side, you forge a bond of trust and they certainly did,” said David Axelrod, Obama’s longtime adviser.

But Geithner also became a magnet for criticism. The biggest financial firms had been rescued with hundreds of billions of dollars of taxpayer money, while many ordinary Americans languished, often stuck in homes worth less than what was owed on them.

Given that unequal outcome, Geithner was seen as someone standing in the way of proposals to punish bankers who had caused the crisis. But Geithner’s allies say that he had different motivations.

“Tim’s objective was to help Main Street, not to hurt Wall Street,” said Lawrence Summers, a Treasury secretary during the Clinton administration and, for two years, Geithner’s counterpart in the Obama White House. “Tim recognized that just as there are unintended victims in just wars, there were unintended and undesired beneficiaries in an appropriate financial rescue.”

Nonetheless, a caricature of Geithner emerged as a former banker who had acted primarily to help his old friends. People close to him tried to correct it but found no easy way, and Geithner had little interest in trying to change his public image.

“I would try to think about ways to help soften his image,” said Ted Truman, who worked for Geithner in 2009 and was a friend for many years before. “He didn’t have anything to point to or realistically say when he was talking about these issues so that he could bring it home to Main Street.”

‘Are you sure you want to pay?’

After long days at work during the crisis, Geithner sometimes went out to dinner with top advisers at one of his favorite spots, Indian restaurant Rasika in Penn Quarter. Geithner always insisted on paying.

One time, the gesture struck a colleague as odd. “Are you sure you want to pay?” said Mark Patterson, his chief of staff, a former top congressional aide turned Goldman Sachs executive. “You’re the fourth poorest person at the table.”

The others, Neal Wolin, deputy Treasury secretary, and Jake Siewert, Geithner’s counselor, had held top jobs at the Hartford Financial Services Group and Alcoa, respectively, before coming to the Obama administration. Geithner had worked at the IMF and at the New York Fed.

“I’ll be fine,” he responded.

Geithner made a healthy salary, of course, but his life was far different from the long line of millionaires who held the job of Treasury secretary before him — including one of his mentors, Robert Rubin, and his predecessor, Henry Paulson, both of Goldman Sachs.

It was a critical difference: Geithner had surrounded himself with finance executives, but he was never one himself. When Obama turned to the matter of rewriting the nation’s financial rules, that distance became an important factor.

Early in the process, during a meeting with Obama at the White House, Jamie Dimon, the chief of executive of JPMorgan Chase, made an offer to come with other bankers to Treasury to help develop the broad framework for how to tighten oversight of Wall Street.

Geithner declined. Dimon followed up. Geithner declined again. Dimon grew frustrated and complained personally to Obama and others in the White House that Geithner was being unhelpful, according to people familiar with the matter.

But his protestations fell on deaf ears.

To his colleagues, the Treasury secretary described bankers who relentlessly protested the new regulations as “whiners” and, in routine meetings with top chief executives held at the Willard Intercontinental Hotel, he often told them they should stop fighting regulation.

The passage of Dodd-Frank ruptured relations between Geithner and Wall Street — as well as between Wall Street and the president, whom the industry had supported in the 2008 campaign and turned heavily against last year.

“The banks were very critical of me — not just of the president and his advisers — for fundamentally going too far in changing the economics of their business,” Geithner said in the interview. “We made a conscientious choice that the integrity of the reforms would be questioned if there was a perception that they had an undue influence over the outcome.”

By the halfway point of Obama’s first term, Geithner was ready to leave. The upcoming battles, legislative confrontations with Republicans over the budget and federal debt, were not his bailiwick. He missed spending time with his family, who often took his public vilification hard. Geithner’s son wanted to return to Larchmont, N.Y., to finish his senior year of high school, and his father hoped to be there as well.

But Obama pressed him to stay. On a hot August afternoon, Geithner was driven back to his unassuming split-level residence in Bethesda and helped his son load up a Penske truck with some of his family’s belongings — leaving enough furniture so that he alone could remain in Washington. He got behind the wheel and drove up I-95 to Larchmont, the Secret Service trailing behind.

Pressure on Europe

One of the top reasons that Obama asked Geithner to stay was his experience with foreign financial crises, according to administration officials, at a time Europe’s problems were threatening to derail the U.S. recovery.

Geithner consistently pushed for an approach in Europe that mimicked the U.S. response in 2008 and 2009 — a large government-backed firewall — and tried to infuse his advocacy with humility, acknowledging that the world’s financial problems had started in the United States.

But the Europeans at first did not appreciate his advice, according to Lagarde.

“His role was often resented by the Europeans who thought that he was interfering too much,” she said. But she added that his entreaties grew more persuasive over time, as Geithner adopted a softer approach, and he had better results convincing the Europeans to take the steps necessary to stabilize their financial system.

“His style evolved over time,” she said. “He’s smart enough to understand where not to push too far and where to stop and how to sort of mitigate a little bit his impatience.”

At home, Geithner turned his attention to the housing market, which was a major drag on the economy. Millions of homeowners underwater on their properties remained a blight on the administration’s record. Many critics used the inability to right the housing market as a prime example of how the government bailed out banks but not everyday Americans.

Geithner said he understands the frustration, given that he helped push “powerful things” to rescue the financial system. In housing, he said, the administration had far more limited authority and faced a more in­trac­table problem. Overall, he said, he feels “very comfortable with the broad choices we made.”

But he said he did change his mind about at least one policy affecting the housing market. He was originally skeptical about the value of taxpayer-subsidized principal reductions for underwater borrowers. And while he never agreed with people who called for a massive taxpayer-subsidized plan to forgive mortgage debt, his evolving understanding of the housing crisis as it unfolded convinced him that a more limited program was warranted.

“Early on I thought that it was just more efficient and more quick and more powerful to give the relief in the form of payment relief,” he said. “If you could complement that program with targeted principal reduction [for those] deeply underwater, you could have better outcomes.”

In the last chapter of his service on Obama’s team, Geithner was tapped to lead negotiations on Capitol Hill over the fiscal cliff — a notable transformation for a man who earned scorn in Congress early in his term.

Geithner said the administration has been successful in winning political support for many policies — including making progress on the debt. It has been less successful, he said, in pursuing additional stimulus to help the economy or in sealing a comprehensive deal to slow federal borrowing.

He leaves the challenge of finding a way to generate enough support for those proposals to his nominated successor, White House chief of staff Jack Lew.

“We’re still searching,” Geithner said.