Asian stock markets soared as the White House and congressional leaders announced they had at last reached a bipartisan compromise to raise the country’s borrowing limit, averting the possibility of a U.S. default two days ahead of a deadline for a deal.

Japan’s Nikkei 225 index, which includes major Japanese companies, bounced 1.83 percent in early trading in Tokyo on Monday after opening up 0.75 percent. The Standard & Poor’s 500/ASX 200 index, a measure of Australia’s blue-chip stocks, rose 1.95 percent after opening up 0.36 percent before the announcement.

Singapore’s benchmark Straits Times index began trading up 0.77 percent, while South Korea’s benchmark KOSPI edged up 1.69 percent and Hong Kong’s Hang Seng index moved 1.49 percent higher.

“The price reaction today is strong,” said Koji Ochiai, chief market economist at Mizuho Investors Securities in Tokyo.

The rallies came on the heels of an announcement by President Obama said late Sunday that congressional leaders had reached a bipartisan deal to raise the country's borrowing limit and cut spending, following earlier indications from Senate Majority Leader Harry M. Reid (D-Nev.) that an agreement was in the works.

Not all markets were up on the news. Shanghai’s Stock Exchange Composite index began the day down about 0.33 percent.

Still, analysts said the breakthrough was a big boon for the Asian markets, which had been dragged lower by the growing uncertainty over whether a deal would be reached in time.

“There was nothing else really driving weakness in the market,” said Savanth Sebastian, an equities economist at the Commonwealth Bank of Australia in Sydney. He added that the U.S. debt talks have been the “dominating factor” for the Australian stock market, which finished July down for a fourth consecutive month.

Global markets have been closely watching the debate over the U.S. borrowing limit because of the crucial role that U.S. Treasury bonds play in all manner of financial transactions. If a deal had not been reached by Tuesday, the United States would have faced a potential default, which would have made Treasurys riskier to hold and sent shock waves through world financial markets that depend on them as a safe store of value.

The uncertainty about a deal rattled markets last week, lowering major stock markets in Asia and eventually flowing through to the United States, where the Dow Jones Industrial average and the Standard & Poor’s 500, the country’s two major stock indexes, posted their worst trading week in more than a year.

But the coming week could reverse those losses. News of agreement on the debt talks sent future contracts on the the Dow Jones Industrial average, the Standard & Poor’s 500 and the Nasdaq up more than 1 percent late Sunday, indicating that traders were more optimistic about the market’s prospects.

Investors also retreated from safe bets they had made last week after the debt talks broke down and a deal seemed less likely. Gold, long considered a safe store of value during turbulent times, edged down about 1 percent, to $1,613.15 per Troy ounce, leaving behind the all-time nominal high it hit Friday.

Another positive sign was the strengthening of the dollar against several major currencies, including 0.96 percent against the Swiss Franc and 1.15 percent against the Japanese Yen, which many investors consider safety plays during turbulent times.