NEW YORK — U.S. stocks fell on Tuesday on uncertainty about how Cyprus will avoid a bankruptcy and possible reverberations in the euro zone as the region struggles to emerge from economic crisis.

Cyprus’ parliament rejected a tax on bank deposits as a condition of an international bailout.

Banks in Cyprus will remain closed until Thursday.

Investors in U.S. equities took advantage of the anxiety in Europe to cash in some recent gains, which have put the S&P 500 on track to post its best quarter in a year. Tuesday’s selloff, however, has set the S&P 500 for its biggest largest daily loss in three weeks.

The market’s decline is a reaction to uncertainty surrounding the vote in Cyprus and its implications for the euro zone’s recovery, said Hugh Anderson, managing director at HighTower Advisors in Las Vegas.

“Stronger nations have been willing to backstop the weaker ones, but there seems to be a limited supply of patience,” he said.

“The market is ready for a reasonable correction,” Anderson said, regarding the S&P 500′s gain of nearly 10 percent so far this year. “Whether it will be more significant because of an unforeseen catalyst remains to be seen.”

European bank shares extended Monday’s decline, with the sector’s index down 2.1 percent in Tuesday’s trading.

On Wall Street, energy-related stocks led declines, with the PHLX oil services sector index down 2.6 percent. Schlumberger Ltd. fell 3.9 percent to $73.39. Halliburton dropped 4.4 percent to $38.92.

Brent crude oil futures hit a three-month low below $108 per barrel on concern about energy demand in Europe if the situation in Cyprus were to escalate.

The Dow Jones industrial average fell 29.76 points or 0.21 percent, to 14,422.30. The S&P 500 lost 7.95 points or 0.51 percent, to 1,544.15. The Nasdaq Composite dropped 20.78 points, or 0.64 percent, to 3,216.81.

Walgreen Co. and partner Alliance Boots said they signed a 10-year deal with AmerisourceBergen and will take a stake in the distribution company, ending Walgreen’s current contract with Cardinal Health Inc.

Walgreen shares hit $45.80, their highest since September 2007, and were last up 5.3 percent at $44.66. Amerisource gained 5.1 percent to $50.78. In contrast, Cardinal lost 7.3 percent to $42.75.

Housing starts data showed that groundbreaking to build new U.S. homes climbed in February and new permits for construction rose to their highest since 2008, in a sign the U.S. housing market’s recovery was building momentum.

The PHLX housing sector index rose 0.4 percent to 191.86, after earlier hitting 194.41 — its highest level since late July 2007.

Shares of Electronic Arts Inc. fell 8.7 percent to $17.10 a day after the video games publisher’s chief executive resigned after six years at the helm, saying he held himself accountable for missed targets.

Drugmaker Affymax Inc. said it was considering selling itself or filing for bankruptcy as it struggles to stay afloat following the recent recall of its sole commercial product, the anemia drug, Omontys. The stock plunged 63.7 percent to $1.07.