U.S. markets rose from the opening Monday but quickly fell after the release of a negative manufacturing report.

The early optimism followed the news that U.S. legislators had agreed Sunday to a last-minute deal to raise the government's debt limit, preventing the world's largest economy from defaulting on its financial obligations.

But that was quickly replaced by concern about the U.S. economy's strength after the Institute of Supply Management reported its manufacturing index fell to 50.9 in July, just above the 50-point figure that shows manufacturing is growing. Economists had been predicting 55.

After gaining 139 points and falling 146 points, the Dow Jones industrial average closed down 10.82 points or 0.1per cent at 12,132.49.  The Nasdaq fell 0.43 per cent or 11.77 points to 2,744.61and the S&P 500 was down 0.41 per cent or  5.95 points to 1,286.94.

The Toronto stock market was closed for a holiday.   

U.S. President Barack Obama said Republican and Democratic leaders had agreed on a deal to cut more than $2 trillion US of federal spending over 10 years and to allow the treasury to resume borrowing, thus avoiding a default.

Both houses in Congress have to vote on the deal, but the reaction of Asian markets, which had been trading for hours when the U.S. markets opened, suggested confidence in the vote.

"There is always the potential for a stumble here, but market reaction seems confident it will pass," said David Jones, chief market strategist at IG Index.

European markets echoed the spike and drop of their American counterparts. The FTSE 100 index of leading British shares closed down 0.7 per cent after shooting up 1.25 per cent in earlier trading, while Germany's DAX was down 2.9 per cent and the CAC-40 in France shed 2.3 per cent.

Chinese shares were weak after HSBC's purchasing managers' index fell and showed manufacturing contracting. China's main index in Shanghai rose less than 0.1 per cent.

Japan's Nikkei 225 stock average closed up 1.3 per cent, South Korea's Kospi gained 1.8 per cent and Hong Kong's Hang Seng added one per cent.

Oil prices fell after an early gain, with the benchmark oil for September delivery falling 81 cents US to $94.89 US a barrel on the New York Mercantile Exchange.

Investors have been concerned by the U.S. political brinkmanship, knocking down stock prices, and driving up safer investments like bonds and gold, out of concern that legislators would fail to reach an agreement.

Gold, which had risen to new highs on the uncertainty, fell $9.20 to $1,619.10 US an ounce on Monday.

With files from The Associated Press