U.S. stocks edged lower on Friday in a session with sparse economic data, but the S&P 500 and Nasdaq remained on pace for their eighth positive week in the last nine.

The S&P 500 has traded in a tight range in the past two weeks, mostly holding on to gains of nearly 9 percent since the beginning of the year. The index has risen more than 28 percent from its closing low in October.

Investors were keeping a close eye on oil prices, which have risen more than 16 percent since the start of February. U.S. crude oil futures fell 2 percent to under $107 a barrel a day after hitting a 10-month high above $110 on supply concerns in the Middle East.

A steep rise in crude and gasoline prices could cut into consumer spending and damage the economic recovery.

We've had a pretty big move since the end of the third quarter last year that has been driven by a variety of factors but we are maybe at a point now where the market needs to digest some of the move that it has had, said Doug Foreman, director of equities at Kayne Anderson Rudnick in Los Angeles California.

If we have some big event in the Middle East with Iran or what have you then obviously that could throw a monkey wrench into things in the short run.

The Dow Jones industrial average <.DJI> dropped 32.74 points, or 0.25 percent, to 12,947.56. The Standard & Poor's 500 Index <.SPX> lost 4.49 points, or 0.33 percent, to 1,369.60. The Nasdaq Composite Index <.IXIC> fell 8.48 points, or 0.28 percent, to 2,980.49.

For the week, the Dow is off 0.2 percent, while the S&P 500 is up 0.3 percent and the Nasdaq is up 0.7 percent.

Aides to U.S. President Barack Obama and Israeli Prime Minister Benjamin Netanyahu are scrambling to bridge differences over what Washington fears could be an Israeli attack on Iran's nuclear sites, a concern at the heart of the recent spike in oil prices. Both leaders will meet on Monday.

The U.S. dollar's strength against the yen and the euro could continue to pressure oil and other commodity prices.

Yelp Inc's stock surged more than 60 percent in its debut, reaching as high as $26 per share. The initial public offering was priced at $15 a share, above the expected price range, valuing the U.S. consumer review website at nearly $900 million.

Wynn Resorts Ltd shares rose 5.9 percent to $129.29

when the stock resumed trading, following a halt after the company disclosed in a regulatory filing a land concession has been published in the official gazette of Macau. That was off the stock's intraday high of $131.12, reached before the trading halt.

U.S. food and drink maker Sara Lee Corp will pay a special $3 dividend after it completes the spin-off of its coffee and tea business, expected by the end of June. Sara Lee's shares shot up 5.8 percent to $21.58.

Shares of Shutterfly Inc jumped 18.9 percent to $31.99 after bankrupt Eastman Kodak agreed to sell its online photo services business to Shutterfly for $23.8 million.

(Reporting by Chuck Mikolajczak; Editing by Jan Paschal)