The major stock indexes closed mostly lower Friday, capping a day spent wavering between small gains and losses.

Phone companies were the biggest drag on the market following reports that AT&T was considering a deal to acquire the media conglomerate Time Warner. AT&T, Verizon, Sprint and T-Mobile US all fell.

advertisement | advertise on newsday

Health care and energy stocks also took some losses. Consumer staples and technology companies held on to slight gains.

Earnings from banks and other financial companies have been mostly better than anticipated. “We’re seeing a lot better earnings come out of the financial sector in particular, and some good earnings come out of technology,” said David Schiegoleit, managing director of investments at the Private Client Reserve at U.S. Bank. “But when you look at the market overall we’re still being weighed down by energy.”

The Dow Jones industrial average fell 16.64 points, or 0.1 percent, to 18,145.71. The Standard & Poor’s 500 index slipped 0.18 points, or 0.01 percent, to 2,141.16. The Nasdaq composite index gained 15.57 points, or 0.3 percent, to 5,257.40.

The three indexes ended slightly higher for the week. The Dow is now up 4.1 percent for the year, while the S&P 500 is up 4.8 percent. The Nasdaq is up 5 percent.