U.S. stocks edged lower on Tuesday as economic data showing contracts for home sales rose more than expected in June was offset by investors booking profits after the recent rally.

Investors sold shares in the utilities, telecommunication services and energy sectors after Monday's run-up extended the benchmark S&P 500's <.SPX> rally. The S&P has gained 48 percent since early March.

Pending sales of previously owned U.S. homes rose at a faster-than-expected pace in June, advancing for the fifth-straight month for the first time in six years, according to the National Association of Realtors.

The Dow Jones U.S. Home Construction index <.DJUSHB> rose 3 percent, reversing earlier losses, after the June pending home sales report.

The economic information keeps coming out as positive for the U.S. economy, (which means that) the favorable factors are still the foundation for the market, said Edward Riley, chief investment officer of Riley Asset Management in Boston.

But, Riley said, it's a profit-taking day. Any correction of this type should be used as an opportunity to buy more.

The Dow Jones industrial average <.DJI> shed 5.44 points, or 0.06 percent, to 9,281.12. The Standard & Poor's 500 Index <.SPX> dropped 1.87 points, or 0.19 percent, to 1,000.76. The Nasdaq Composite Index <.IXIC> fell 7.15 points, or 0.36 percent, to 2,001.46.

Other economic news included a Commerce Department report that U.S. consumer spending rose slightly more than expected in June, though personal income declined month over month by a greater-than-expected 1.3 percent.

Energy shares were among the drags as U.S. front-month crude prices fell by about 1 percent to $70.81 a barrel.

Oil majors Chevron Corp fell 0.7 percent at $79.91, and Exxon Mobil Corp dipped 0.4 percent to $70.36.

Among advancers, PepsiCo Inc
was up 4.6 percent at $58.80 after it said it agreed to buy Pepsi Bottling Group Inc
and PepsiAmericas Inc
in a cash-and-stock deal with $7.8 billion.

Shares of Pepsi Bottling gained 8.1 percent.

Cognizant Technology Solutions Corp led the gainers on the Nasdaq, having posted better-than-expected second quarter profits before the bell. It was up 10.1 percent to $33.54.

Apple Inc , which had led the gains in the recent rally, was down 0.9 percent.

(Reporting by Rachel Chang; Editing by Padraic Cassidy)