The stock market had its worst day in three weeks as traders worried about Greece's debt problems and a surge in the value of the U.S. dollar.

Energy stocks fell more than the rest of the market Tuesday as the price of crude oil slumped. Transocean and Allegheny Technologies each fell 4 percent.

advertisement | advertise on newsday

At the close on Wall Street, the Standard & Poor's 500 index declined nearly 22 points, about 1 percent, to 2,104.2. The Dow Jones industrial average was down 190.5 points, about 1 percent, at 18,041.5, and the Nasdaq composite dropped 56.6 points, about 1.1 percent, to 5,032.8.

The U.S. benchmark crude oil fell $1.69, or 2.8 percent, to $58.03 a barrel on the New York Mercantile Exchange.

Time Warner Cable rose 7 percent after agreeing to be acquired by Charter Communications. Charter shares were up 2.5 percent.

The dollar rose against the Japanese yen and the euro.