Saul Loeb/Agence France-Presse — Getty Images

The nation’s six largest banks reported $23 billion in profits in the second quarter, but they could end up victims of their own success.

In recent weeks, the Treasury Department, senior regulators and members of Congress have stepped up efforts intended to make the largest banks safer. The banks have warned that more regulation could undermine their ability to compete and curtail the amount of money they have to lend, but the strong earnings that came out over the last week could undercut their argument.

The most pressing concern for banks is a relatively tough new rule that regulators proposed last week that could force banks to build up more capital, the financial buffer they maintain to absorb losses. But the banks did not demonstrate any difficulty in meeting the proposed rules, and the banks now appear to have fewer allies in Washington than at any time since the financial crisis.

This was highlighted on Wednesday when the Treasury secretary, Jacob J. Lew, effectively issued an ultimatum to Wall Street, calling for the swift adoption of rules introduced through the Dodd-Frank financial overhaul law, which Congress passed in 2010. Mr. Lew also said that he might be open to stricter measures if enough had not been done to remove the threat that big banks can pose to the wider economy.

“If we get to the end of this year, and cannot, with an honest, straight face, say that we’ve ended ‘too big to fail,’ we’re going to have to look at other options because the policy of Dodd-Frank and the policy of the administration is to end ‘too big to fail,’ ” Mr. Lew said.

“This is maybe the strongest admission I’ve heard from the administration that we must act further to end ‘too big to fail,’ ” Senator David Vitter, Republican of Louisiana, said in a statement. Along with Senator Sherrod Brown, Democrat of Ohio, Senator Vitter introduced a bill earlier this year that would sharply increase capital levels at the biggest banks. In Congress on Thursday, Ben S. Bernanke, the Federal Reserve chairman, echoed Mr. Lew’s remarks. He said that if the measures already planned did not remove the risks posed by large banks, “additional steps would be appropriate.”

Still, some analysts remain skeptical that the Fed and the Treasury would really lend their weight to the sort of aggressive measures some lawmakers are contemplating. The recent comments may be an attempt to gain some political benefit from looking tough on the banks. And the remarks may be aimed at reducing any momentum that the more draconian pieces of bank legislation are gaining in the Senate.

“I wonder how much of this is a serious policy change and how much is positioning by the administration to take on a more populist mode going into 2014,” Nolan McCarty, a professor of politics and public affairs at Princeton University, said. “It’s a little bit surprising that, three years after Dodd-Frank and five years after the financial crisis, people are concerned not enough has been done.”

Still, the stronger words from government officials could shift the balance of power away from the banking industry.

“I sense a sea change in this,” Sheila C. Bair, a former chairwoman of the Federal Deposit Insurance Corporation, a primary bank regulator, said. “It’s not moving with the banks, it’s moving against them.”

The resurgence in bank profits appears to have been an important factor in persuading regulators to do more. The earnings revival did not take place just at the banks that emerged from the crisis in a position of relative strength, like JPMorgan Chase and Wells Fargo. This week, both Bank of America and Citigroup, which faltered badly after the financial crisis, reported healthy profits. The stocks of both banks have nearly doubled over the last 12 months, highlighting that investors’ faith in the behemoths is also returning.

“The regulators are doing this because they can,” Michael Mayo, a banking analyst at CLSA, said. “And they can at this time of relative stability.”

The six largest banks now dominate the industry, accounting for more than half the sector’s assets. Since the crisis, this has helped them make profit from mortgages and credit card loans, as well as Wall Street activities, like trading securities and underwriting deals. Their second-quarter profits were up 40 percent compared with those in the period a year earlier. Over the last 12 months, their combined profits were more than $70 billion. Over that period, Morgan Stanley, Goldman Sachs and JPMorgan’s investment bank, all big presences on Wall Street, paid compensation of $41 billion.

Regulations planned or put in place in the crisis may also have helped banks by making them more resilient to shocks. The banks have less risky assets on their balance sheets, which helped them get through the recent rout in the bond market without big losses.

“You had major dislocations in currencies, commodities and interest rates and so far the industry has passed with flying colors,” Mr. Mayo said.

Still, Mr. Mayo and others question how healthy the banks are. While profits are up, and trading profits are buoyant, the pace of lending is not picking up. “Loans are down year to date. That’s the issue at the moment,” he said. “This is not the stuff robust recoveries are made of.”

The industry contends that, with economic growth still relatively weak, more regulation of banks would be wrong.

“You have to be cautious about what layering on additional things can do to our prospects for economic growth, job creation and credit availability, in light of this economic fragility,” said Robert S. Nichols, president of the Financial Services Forum, an industry group that represents large banks. “We have to have more robust growth to get Americans back to work.”

While banks have made big profits under stiffer rules since the crisis, some analysts warn that adding more to the overhaul could really start to hurt.

“We’ve reached a point now where we have a balance,” John R. Dearie, who oversees policy at the Financial Services Forum, said. “We have a fortress balance sheet banking system. Our concern is that we don’t overdo it.”

Still, some banking experts think the banks are bluffing when they say more regulation could hamper lending. “They can’t see that it is in their long-term interests to have a credible regulatory process,” Ms. Bair said.