European leaders adopted a groundbreaking new treaty Monday that binds them to imposing caps on deficits and government debts to combat the painful financial crisis that has sabotaged prosperity across the continent and left it slipping toward recession.

The treaty, endorsed by 25 of the 27 European Union governments, was intended as a gesture to show skeptical financial markets that European governments are at last committed to gaining control over lax borrowing habits that over the last four decades have helped create dangerously high debts.

But the effort is just the latest in a series of efforts over many months to contain the crisis, and it was unclear whether Monday’s action would be enough. Europe’s mounting debts have already led to bankruptcy in Greece and raised the specter of default in several other countries, leading to fears of cascading financial turmoil that could disrupt once booming economies not only across Europe but also in the United States and as far away as Asia.

European leaders are determined to prevent that from happening, said Herman Van Rompuy, the E.U. president. “The treaty is all about more responsibility and more surveillance,” he said.

The effort was undermined, however, by Britain’s reluctance to go along, citing its determination not to relinquish national sovereignty to the treaty’s provisions for automatic sanctions against governments that exceed the new debt limits. In addition, the Czech Republic also declined to sign up, with the government saying it was not sure it could get such a treaty approved in its parliament and courts.

Moreover, a chorus of European officials and economists have questioned the wisdom of the treaty in the first place. The pact was unnecessary, they contend, because European rules — merrily ignored over the years — already forbid excessive government deficits and because the emphasis should be on economic growth rather than fiscal discipline.

Martin Schulz, president of the European Parliament, lectured the gathered presidents and prime ministers on the need to stimulate growth and provide more jobs for the unemployed.

“The aim of the fiscal pact is to win back the confidence of the markets, and we certainly need that,” Shulz, a leader of Germany’s opposition Social Democratic Party, said in a brief speech. “At the same time, however, we must take care not to lose the confidence of ordinary people.”

With that in mind, the European leaders also announced measures designed to foster employment and provide financing for small and medium-sized businesses.

“Governments are undertaking strong efforts to correct budgetary imbalances on a sustainable basis but further efforts are needed to promote growth and employment,” they declared. “There are no quick fixes. Our action must be determined, persistent and broad-based. We must do more to get Europe out of the crisis.”

Van Rompuy also recognized that fiscal discipline is not enough to restore prosperity. “We recognize that financial stability is not enough in itself to get out of the crisis,” he told a news conference. “We must do more, particularly in the areas of growth and employment.”

The E.U.’s economic growth declaration was replete with plans to help train young people and ease their entry into the job market, along with pledges to find new ways to get money to small-business owners in a credit-scare economic environment. In fact, however, most such economic efforts are decided by national governments, which for months have been wrestling to find ways to solve the same problems discussed in Brussels.

Monday’s deficit-capping treaty — the outlines of which were agreed upon late last year — was viewed as a testament to Germany’s growing influence in European affairs. German clout has been increasing since the continent was struck in 2008 by the economic crisis that began on Wall Street, and then since last summer by the realization that European government debt had spun out of control. In large measure, this has happened because Germany’s export-oriented economy is booming and its government debt is under control, but also because the legacy of World War II is fading.

The conservative German chancellor, Angela Merkel, has insisted that fellow European governments must discipline themselves to limit their budget deficits and the borrowing that finances them. This has been a controversial point in German politics because, with its cash on hand, Germany often has been the source of funds used to bail out Greece and other fiscally wayward governments in southern Europe.

Merkel has been adamant, for example, that until it enacts more budget cutbacks Greece cannot receive the next installment of a rescue package managed by the E.U., the International Monetary Fund and the European Central Bank. Greek officials have been reluctant to go any further in austerity measures, saying the Greek people already have been squeezed to the limit and such services as health care are starting to falter.

Against that background, a suggestion surfaced in Germany last week that the E.U. should send a commissioner to Athens to supervise Greek budgets to make sure the savings imposed by the E.U. are actually carried out. That was quickly dropped, however, after Greek officials complained that their national dignity was at stake, and President Nicolas Sarkozy of France predicted an early accord.

Talks on the rescue package have been under way simultaneously with negotiations on a Greek debt swap under which lending banks and financial institutions would be asked to take at least a 50 percent loss. Those discussions were said last week to be near completion but appeared to snag again over the weekend. Officials said Monday they still hope to wrap up the deal by March 14, when Greece has a large debt repayment coming due.

The E.U treaty’s provisions on deficit and debt limits, according to European economists, have been drawn up as a formula reflecting the relationship between debt and deficit; the smaller the debt, the larger the deficit allowed.

Should a country exceed the limits, Van Rompuy said, an “automatic corrective mechanism” would engage, possibly leading to sanctions such as fines.

Despite the refusal of two countries to sign on, the treaty will enter into force as soon as it is ratified by 12 governments, Van Rompuy said. It was unclear, however, what would happen if other governments are unable to ratify it under their various national procedures.

Ireland has suggested a referendum may be necessary, for instance, and France’s Senate is controlled by Socialists who oppose the treaty. Moreover, Sarkozy’s opponent in a two-round presidential election April 22 and May 6, Francois Hollande of the Socialist Party, has pledged that, if elected, he would repudiate the treaty and demand that it be renegotiated.