WASHINGTON  President Obama delivered an ultimatum to General Motors and Chrysler on Monday, telling them to adopt radical changes in short order or face bankruptcy  a move that came after a series of somber discussions in which he concluded that a controlled bankruptcy might be the best way to reorganize the two ailing auto giants.

Add to Portfolio

In the end, the president decided to throw the companies a short lifeline. He gave G.M. 60 days and Chrysler one month to avert bankruptcy and restructure on their own.

But during that period, Mr. Obama warned on Monday, the automakers will have to drastically reshape their businesses in a way that experts say will severely shrink them.

For G.M., the president’s decision means not only the loss of its chief executive, Rick Wagoner, who was forced out as part of the deal, but also some tough negotiations with the United Automobile Workers and bondholders, who have thus far balked at the company’s demands.

Now the union will be asked to make even bigger concessions on a new wage and benefits contract and health benefits for retirees. The bondholders will most likely be forced to accept a deep discount on the price of their debt as well as agree to take G.M. stock in lieu of debt repayments.

Chrysler, meanwhile, must hurry up a merger deal with the Italian automaker Fiat.

The Obama administration has concluded that Chrysler is not viable as a stand-alone company, and is giving the automaker until April 30 to complete the Fiat merger or face a cutoff of taxpayer help.

If the merger is successful, the administration will consider giving Chrysler $6 billion in additional taxpayer aid.

Mr. Obama decided early on that simply letting the companies fail was not an option, his advisers said. But faced with what one senior official called “no good options,” the president struggled to reconcile his conclusion that G.M. and Chrysler were not viable with his determination to save an industry that he called “an emblem of the American spirit.”

“Year after year, decade after decade, we’ve seen problems papered over and tough choices kicked down the road, even as foreign competitors outpaced us,” Mr. Obama said in announcing his decision at the White House. “Well, we have reached the end of that road.”

While Michigan lawmakers privately balked at the president’s decision to cite bankruptcy, analysts said that by raising the specter of bankruptcy for the two companies, Mr. Obama might have made it easier for both to win concessions. And at least one lawmaker seemed to agree.

“They hopefully will see that they have a pretty stark choice in terms of working something out,” said Senator Carl Levin, a Michigan Democrat, who learned of the plan Sunday night when the president called him and other Michigan lawmakers from the Oval Office. “Their option is either to take a haircut or a bath.”

Indeed, on Monday, Fiat’s chief executive released a statement indicating he was eager to forge an alliance with Chrysler, and Mr. Obama said Fiat had committed to building fuel-efficient cars and engines in the United States.

G.M. said in a statement that it would “take whatever steps are necessary to successfully restructure the company” even if it meant a court-supervised process.

“It’s really about keeping the pressure on the parties, and the government’s doing a good job of that,” said Van Conway, a partner with Conway MacKenzie & Dunleavy, a turnaround consulting firm in Birmingham, Mich. “As unfair as it is to take any concession in business, you’ve got to take the best alternative you’re given in a situation.”

The United Automobile Workers did not respond to several requests for comment on Monday.

The talk of bankruptcy rattled the overall stock market. The Dow Jones industrial average declined 254.16 points, or 3.27 percent, to close at 7,522.02. G.M.’s shares also took a beating, closing down 92 cents at $2.70.

Throughout his bid for the presidency, Mr. Obama talked in stern tones about how the nation’s auto industry needed to improve its ways. His statement from the White House on Monday  an aggressive move, particularly from a Democratic president, to force the industry to revamp itself or lose government aid  represented an extraordinary moment in American manufacturing history, and another weighty moment in a presidency that has been filled with them.

The internal debate that led to the announcement culminated in two back-to-back 45-minute sessions in the Oval Office last Thursday. Members of Mr. Obama’s auto task force, led by two former investment bankers, Steven Rattner and Ronald Bloom, presented the president with what one senior administration official called “an incredibly difficult and painful set of decisions.”

Perhaps the thorniest was the question of bankruptcy. Like his predecessor, former President George W. Bush, Mr. Obama felt that a chaotic bankruptcy would be disastrous for the companies and the broader economy.