Stocks closed higher Wednesday after fears of instability in Hong Kong were eased amid the government’s decision to withdraw an extradition bill that triggered protests that damaged the territory’s economy and Britain’s parliament moved to prevent a hard exit from the European Union.

The Dow Jones Industrial Average gained 237.45 points or 0.91%, mitigating Tuesday’s losses. The S&P gained 1.08% while the Nasdaq Composite was up 1.3%.

The government’s decision to back down gave Hong Kong’s Heng Seng Index its best trading day since November, sending it up 3.9%.

On currency markets, the British pound gained 1.1% against the dollar after Parliament moved to prevent a no-deal Brexit, voting to delay the exit from the European Union until January if no deal is secured by the Oct. 31 deadline. The news also sent the London FTSE up 0.6%.

Hong Kong leader Carrie Lam Cheng Yuet-ngor announced she would withdraw the extradition bill, but critics said the concession was too little, too late. Opposition to the bill sparked 13 weeks of sometimes violent protests. Protesters, however, said they still had four other demands that have yet to be met, including the establishment of a commission to investigate police conduct during the protests and the relaunch of democratic reforms.

General Electric (GE), gained 5.64%, while Advanced Micro Devices (AMD), rose 0.16%, and Bank of America (BAC) jumped 1.63%, to lead the market higher. Shares of Apple (AAPL) gained 1.7%, on plans to introduce a cheaper iPhone in the spring to address declining market share. Apple also launched its first bond deal since 2017, looking to raise as much as $5 billion on 3- to 30-year notes.

Slack Technologies (WORK), the instant messaging service for businesses, was to present its first earnings report since its initial public offering during a 5 p.m. EDT conference call. Slack was expected to report a loss of 19 cents a share on revenue of $141.3 million. Shares of Slack jumped 8.03% ahead of the call.

The Commerce Department’s Bureau of Economic Analysis reported the July trade deficit fell 2.7% to $54 billion, with exports gaining 0.6% to $207.4 billion and imports falling 0.1% to 261.4 billion. The report showed trade surpluses with Central and South America, Hong Kong, Brazil, the United Kingdom, OPEC and Singapore. Deficits were recorded with China, the European Union, Mexico, Germany, Japan, Italy, Canada, India, Taiwan, France, South Korea and Saudi Arabia.

Yield on the 10-year bond and 30-year U.S. Treasury notes were virtually unchanged at 1.472% and 1.975%, respectively.

Crude oil futures were up 4.5% and gold gained 0.45%.