U.S. President Barack Obama signed a $787 billion economic stimulus bill into law on Tuesday as global markets plunged on fears that the recession would deepen despite government action in many countries.

Obama, who has described the package as one part of a plan to solve his country's economic ills, was expected to lay out a strategy on Wednesday to stem home foreclosures and address the housing crisis that sparked the financial sector meltdown.

Meanwhile financially strapped General Motors Corp and Chrysler LLC raced to finish restructuring plans that must be submitted to the Obama administration by the end of the day as part of efforts to keep America's biggest carmakers afloat.

Obama, speaking in Denver where he visited a solar power installation, has staked his political reputation on the package, a mixture of tax cuts and spending projects, saying its success will determine his success as president.

We're putting Americans to work doing the work that America needs done in critical areas that have been neglected for too long ... work that will begin real and lasting change for generations to come, Obama said.

The White House has said it will take about a month for the money to start flowing from the package. Some economists, however, believe the measures will come too late to have an effect in 2009, when many forecasters predict full-year output will contract.

The package includes working class tax cuts, infrastructure spending, help for the poor and unemployed and investment in alternative energy.

Obama has predicted that the stimulus plan will save or create more than 3.5 million jobs over the next two years.

Though a major success for his young presidency, the stimulus debate in Congress laid bare bitter divisions over how to boost an economy suffering a rising jobless rate of 7.6 percent and a banking crisis that has nearly frozen lending.

Only three Republicans voted for the measure in the 100-seat Senate, and no Republicans broke ranks to support it the House, arguing it had too much spending and not enough tax breaks. The final plan was split into 36 percent for tax cuts and 64 percent in spending and other provisions.

U.S. stocks slid on Tuesday, sending Wall Street near bear-market lows and tracking other global markets which sank on fears that government action will not be enough to pull the United States out of recession and avert a deepening worldwide financial crisis.

(Editing by David Storey)