Adding to the market weakness is news out of Washington, where Defense Decretary Chuck Hagel said that North Korea, which has been engaging in saber rattling with the U.S. in recent weeks, presents a "real and clear" danger to the U.S. and its allies. The defense secretary also said the U.S. was moving some missile defense systems to Guam.

The rise of a fresh geopolitical threat could be enough to rattle the market, which hit fresh record highs on Tuesday and which some Wall Street pros say is ripe for a correction, says Jack Ablin, chief investment officer at BMO Private Bank.

"If investors are inferring some sort of an escalation of tensions then I think, yes, there is cause for concern," Ablin says, adding that the "unpredictability" of the situation could give investors pause.

The Dow Jones industrial average had its worse day in five weeks, losing 111.66 points, or 0.7%, to 14,550.35. The Standard & Poor's 500 index fell 16.56 points, or 1.05%, to 1,553.69 as all 10 of its sectors closed lower. The tech-laden Nasdaq composite index lost 36.26 points, or 1.11%, to 3,218.60.

In energy markets, oil prices fell nearly 3%, pressured by a bigger-than-expected increase in last week's U.S. crude supplies. The price of a barrel of crude oil for May delivery was down $2.77, or 2.8%, to $94.42 per barrel in electronic trading on the New York Mercantile Exchange. The contract gained 12 cents to finish at $97.19 per barrel on the Nymex on Monday.

Investors fled to the safety of U.S. Treasury bonds, and the yield on the 10-year U.S. Treasury note fell to 1.81% from 1.86% Tuesday. Prices, which move inversely to yields, soared.

The price of gold continued its sell-off. After losing nearly $19 an ounce Tuesday, the price of gold was off $17.70 to $1,558.20 Wednesday.

In currency trading, the euro was stronger against the dollar, trading up 0.2% to 1.2847. The dollar was weaker against the Japanese yen, down 0.5% to 92.95.

On Tuesday, the Dow and the S&P 500 closed at record highs. Stocks rallied following positive news on Medicare reimbursement and rising U.S. factory orders in February.

The Dow rose 0.6% to 14,662.01. The S&P 500 climbed up 0.5% to 1,570.25. The tech-laden Nasdaq composite index gained 0.5% to 3,254.86.

In Asian markets, Japan's Nikkei 225 rose 3% to close at 12,362.20 on Wednesday. The country's central bank started its first policy meeting under a new governor committed to aggressive monetary action to end years of economic malaise.

However, other benchmarks in Asia were down. In mainland China, the Shanghai Composite index fell 0.1% to 2,225.29. South Korea's Kospi dropped 0.2% to 1,983.22. Hong Kong's benchmark Hang Seng index closed down 0.1% to 22,337.49.