Editor’s note: A prior version of this story gave an incorrect level for the Dow industrials.

NEW YORK (MarketWatch) — A surging U.S. stock market rallied to its best two-day gains in three years Thursday.

The monster rally, which kicked off Wednesday after Federal Reserve Chairwoman Janet Yellen assured the markets that the central bank would be patient about lifting interest rate, burst into an all-out bull run late in Thursday trading.

The move caps a two-day charge higher, bringing the Dow back to within shouting distance of 18,000, after rocky trading days.

The Dow Jones Industrial Average DJIA, -1.84% soared 421 points, or 2.4%, to 17,778.15, its biggest one-day gain in three years, a day after the Federal Reserve said it “can be patient” about the timing of its first rate hike, signalling increases will be slow and steady.

It was the first time in more than six years since the Dow recorded back-to-back days of gains exceeding 200 points.

The S&P 500 SPX, -1.15% jumped 48.34 points, or 2.4%, to 2,061.23, its biggest one-day gain in nearly two years. It is also the first time since Aug 2002 that the benchmark index posted two consecutive days of gains greater than 2%, according to Howard Silverblatt, senior index analyst at S&P Dow Jones Indices.

The Nasdaq Composite COMP, -0.13% jumped 104 points, or 2.2%, to 4,748, as technology companies recorded big gains.

Jonathan Golub, chief U.S. market strategist at RBC Capital Markets, attributed Thursday’s rally to halo effect from the Fed’s announcement on Wednesday.

“The Fed told equity investors what we already assumed and believed,” Golub said.

“There was fear that if there was going to be any change in the stance, it would be towards hawkishness, but the statement dispelled that, so stock market rallied,” the RBC strategist added.

Why the Fed tries to be firm and flexible at the same time

In economic news, a weekly jobless claims report came in stronger than expected, confirming the Fed’s view that the economy is strengthening. Claims fell by 6,000 to 289,000, a low level typically associated with strong hiring.

Separately, Philadelphia Fed survey on business conditions was mostly in line with expectations, while leading economic index rose as expected in November.

“The truth is that you can take what you need from yesterday’s FOMC song and dance, but the key take-away for traders was that less-aggressive outlook for the Fed Funds rate forecast by FOMC members for the end of 2015 ....Take ‘em, and bid it,” said Stephen Guilfoyle, chief economist at Sarge986.com, in a note.

Fed decision to trigger more volatility?

Rate hikes, volatility not expected to kill bull market in 2015

Overseas markets: Global markets picked up the baton, with an upbeat business-sentiment survey from Germany lending a hand and helping drive a 3% rally for the Stoxx Europe 600 index SXXP, -3.24% . Asian stocks gained as well, with the Nikkei 225 index NIK, +0.17% surging more than 2%.

The ruble USDRUB, +0.23% rose against the dollar after Russian President Vladimir Putin said during his annual public news conference that the currency will stabilize amid current economic headwinds. Putin also stressed that “external conditions” — referring to sanctions imposed by the West — were pushing Russia into reforms that would make the economy more efficient. The dollar was buying 61.95 rubles, compared with 62.51 late on Wednesday. See Putin gets Russia pumped for public appearance

Not all of Europe was on the rise. Greek stocks GD, -4.28% lost more than 1% after Prime Minister Antonis Samaras failed to get enough support for his nominee in a parliamentary vote for a new head of state. If Samaras repeats that failure in the second and third round of voting, snap elections look set to take place in Greece in early 2015.

The dollar USDJPY, +0.01% pushed lower against the yen on the heels of heavy post-FOMC meeting gains.

Commodities swung in a volatile trade. Oil futures weaved in and out of losses Thursday, swinging by as much as three dollars in either direction as volatility continued to dominate oil trading. U.S. crude settled 4.2% lower on Thursday, snapping a two-session winning streak.

Crude for January delivery CLF25, finished $2.36 lower at $54.11 a barrel on the New York Mercantile Exchange. That was the lowest settlement for a front-month oil contract since early May, 2009. Brent crude UK:LCOG5 was last trading flat $59.66 a barrel. Meanwhile gold prices US:GCG5 settled roughly flat at $1,194.80 an ounce.

Stocks in focus:Accenture PLC ACN, -0.96% rose 5.2% after the management consulting company reported better-than-expected fiscal first-quarter results.

Rite Aid Corp. RAD, +1.71% shares jumped 12% after the drugstore boosted its guidance for the year after posting better-than-expected sales and earnings growth in its November quarter.

Shares of Sony Corp. SNE, -0.87% rose 3.7% after Sony Pictures said it was pulling its planned Christmas debut of “The Interview”, after terrorist threats against theaters showing the movie. U.S. investors said they believe North Korea is behind the recent hack on Sony’s computer systems, said media reports.

Dunkin’ Brands Group Inc. DNKN, -0.01% , shares slumped 6.9% after it lowered a key 2014 sales target Thursday and issued disappointing earnings guidance for next year.

Shares in Pantry Inc. US:PTRY rose 2.7%, after Alimentation Couche-Tard Inc. agreed to buy the convenience-store chain for about $860 million. The companies valued the deal at about $1.7 billion, including the assumption of debt, and it is expected to close in the first half of next year.

Oracle Corp. ORCL, +1.79% surged 10% after the software company late Wednesday reported better-than-expected first-quarter profit and sales and an upbeat outlook. Similar upbeat news from Jabil Circuit Inc. JBL, -1.40% also lifted those shares by 4.4%.

For more on notable movers, read out Movers & Shakers column.