(AP) -- A plunge in Facebook shares weighed on U.S. stocks Thursday, erasing more than $100 billion of the social media giant's market value and snapping a three-day winning streak for the S&P 500 index.
Facebook's tumble led a sell-off in technology companies that offset solid gains in other areas of the market, including industrial and energy stocks and consumer goods companies. Small-company stocks did better than the rest of the market.
The broader gains reflect another round of strong company earnings and fresh optimism among investors that trade tensions between the U.S and European Union may be on the mend.
"It's a shock what happened to Facebook, but that little improvement in the trade picture and the continuation of the earnings results have just been spectacular," said Ted Theodore, portfolio manager at TrimTabs Asset Management.
The S&P 500 index dropped 8.63 points, or 0.3 percent, to 2,837.44. The Dow Jones Industrial Average climbed 112.97 points, or 0.4 percent, to 25,527.07. The Nasdaq composite index lost 80.05 points, or 1 percent, to 7,852.18.
The Russell 2000 index of smaller-company stocks gained 10.16 points, or 0.6 percent, to 1,695.36. More stocks rose than fell on the New York Stock Exchange.
The S&P 500, the market's benchmark index, is still on track for its fourth weekly gain in a row.
Facebook sank 19 percent to $176.26 after the social media giant said that its user base and revenue grew more slowly than expected in the second quarter, and that it expects slower revenue growth ahead. The slower growth came about as the company grappled with privacy scandals. All told, $119 billion of its value was wiped out, more than the entire value of General Electric.
"For such a big company to suffer such a significant decrease in price is really amazing to watch," said Erik Davidson, chief investment officer at Wells Fargo Private Bank.
Investors have been focused on the mostly favorable run of company quarterly earnings the past couple of weeks. At the same time, traders have been wary of global trade tensions, which have ratcheted up in recent weeks as the U.S. and some of its trading partners imposed tariffs and threatened more.
But talks held late Wednesday between President Donald Trump and a European Union delegation gave markets cause for encouragement after both sides agreed to work on a pact to dismantle trade barriers.
Facebook wasn't the only big company to report disappointing quarterly results or outlooks.
Ford lost 6 percent to $9.89 after the automaker disclosed a sharp drop in quarterly profits and said it would undertake a restructuring that will cost $11 billion over the next three to five years.
Mattel also slumped, dropping 4.2 percent to $15.61 after the maker of Barbie and Hot Wheels reported a loss that was larger than analysts were expecting. It also said it would eliminate more than 2,200 jobs.
Reports from other companies put investors in a buying mood.
D.R. Horton jumped 10.9 percent to $43.84 after the homebuilder reported earnings and revenue that easily beat Wall Street's forecasts. It also announced a $400 million share repurchase program.
Qualcomm vaulted 7 percent to $63.58 after the chipmaker reported earnings that beat analysts' expectations and said it would abandon a bid to acquire NXP.
Mondelez International, which sells Oreo cookies and Cadbury chocolate, climbed 4.3 percent to $43.27 after the company's latest quarterly earnings and revenue topped analyst estimates. Traders also bid up shares in rival Hershey, which gained 7.4 percent to $99.66.
Several airlines also traded higher, contributing to industrial sector gains. Alaska Air Group surged 9.6 percent to $64.76, while Southwest Airlines jumped 8.4 percent to $56.70. American Airlines added 4.8 percent to $40.02.
Benchmark U.S. crude rose 31 cents to settle at $69.61 per barrel in New York. Brent crude, used to price international oils, added 61 cents to close at $74.54.
The pickup in oil prices gave a boost to some energy stocks. Marathon Petroleum climbed 7.3 percent to $80.16.
Bond prices fell, sending yields higher. The yield on the 10-year Treasury rose to 2.98 percent from 2.97 percent.
The dollar rose to 111.23 yen from 110.83 on yen Wednesday. The euro weakened to $1.1645 from $1.1699.
Gold fell $6.10 to $1,225.70 an ounce. Silver lost 9 cents to $15.50 an ounce. Copper was little changed at $2.82 a pound.
In other energy futures trading, heating oil rose 3 cents to $2.18 a gallon. Wholesale gasoline added 4 cents to $2.16 a gallon. Natural gas added a penny to $2.78 per 1,000 cubic feet.
Major stock indexes in Europe rose. Germany's DAX jumped 1.8 percent while France's CAC 40 added 1 percent. Britain's FTSE 100 gained 0.1 percent. In Asia, Japan's Nikkei 225 lost 0.1 percent while South Korea's Kospi added 0.7 percent. Hong Kong's Hang Seng lost 0.5 percent.