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.

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.