NEW YORK – Stocks finished a down week with modest gains Friday as investors gauged the fallout from a massive earthquake that struck off the coast of Japan and triggered tsunami waves from Asia to California.

The prospect of falling oil demand from Japan sent crude oil prices down to $101 a barrel. Industrial and materials companies rose on expectations that they will benefit from Japan’s rebuilding efforts.

One day after its biggest fall since August, the Dow Jones industrial average gained 59.79 points, or 0.5 percent, to 12,044.40. The S&P 500 rose 9.17, or 0.7 percent, to 1,304.28. The Nasdaq composite gained 14.59, or 0.5 percent, to 2,715.61.

In addition to the earthquake, oil prices fell after a scheduled day of protests in Saudi Arabia drew only a few hundred people, and the capital remained quiet. Oil traders have been worried the violence in the Middle East and North Africa would spread to the world’s No. 1 oil exporter.

“The market is going to be see-sawing back and forth” until the long-term effects of the unrest in the Mideast and the disaster in Japan become clear, said Anthony Chan, chief economist for J.P. Morgan Wealth Management.

The earthquake and oil protests largely overshadowed a report from the Commerce Department that retail sales rose 1 percent in February, the biggest gain in four months and more than the 0.8 percent analysts had expected. Shoppers laid out more cash for cars, clothing and gadgets in February, leading to an eighth month of gains.

Despite Friday’s gains, each index finished the week lower. The Dow fell 1 percent, while the S&P index lost 1.3 percent.

Stocks fell sharply Thursday on weak economic news from China, the U.S. and Spain combined with a slump in oil company shares. The Dow had its biggest drop since Aug. 11.

“It could be time for a well-deserved rest,” said Ryan Detrick, senior technical strategist for Schaeffer’s Investment Research.