Stocks wobbled to the finish Friday but salvaged a four-day winning streak after the U.S. government said employers added more jobs than expected in February. That was another vote of confidence in the economy. Mining companies made the biggest gains, as metals prices climbed.
The jobs report showed that construction, retail and healthcare companies are still hiring more workers. Energy companies also rose with the recovering price of oil.
Stocks fell back from an afternoon peak as investors sold shares in telecommunications companies, which have been the best-performing sector of the market this year.
The Dow Jones industrial average climbed 62.87 points, or 0.4%, to 17,006.77. The Standard & Poor's 500 index rose 6.59 points, or 0.3%, to 1,999.99. The Nasdaq composite index edged up 9.60 points, or 0.2%, to 4,717.02.
The Labor Department said employers added 242,000 jobs last month. Consumer demand was solid, and the government also said employers hired more people in December and January than previously estimated. More people also looked for work.
This week, stocks rose after reports on hiring, construction spending and manufacturing suggested that the U.S. economy is doing fairly well. Kate Warne, investment strategist for Edward Jones, said she expects job and economic growth to continue.
"The worries that we've been hearing recently about the economy sliding into recession aren't warranted," she said. Combined with low inflation rates, she said, that's good news for investors.
Metals and energy prices kept climbing on the continued signs of life for the economy. Gold, which is trading at its highest price in a year, rose $12.50, or 1%, to $1,270.70 an ounce. Silver jumped 55 cents, or 3.6%, to $15.69 an ounce. Copper rose 7 cents, or 3%, to $2.27 a pound.
The price of U.S. oil jumped $1.35, or 3.9%, to $35.92 a barrel. Brent crude, the benchmark for international oils, rose $1.65, or 4.5%, to $38.72 a barrel in London.
Oil prices climbed about 10% this week and have risen for three weeks in a row, which hadn't happened since May. Brent crude is now higher than it was at the beginning of the year, although U.S. crude is still lower.
Those gains helped copper mining company Freeport-McMoRan jump 63 cents, or 6.9%, to $9.74. Aluminum producer Alcoa edged up 10 cents to $9.57.
Energy stocks also kept rising. Drilling rig operators did the best, as investors were pleased they keep closing rigs to cut costs. Transocean leaped $1.88, or 17.4%, to $12.71. Ensco rose $1.43, or 13.1%, to $12.36.
The market has now erased most of its losses after a painful start to the year. But there are signs investors are still worried: They keep buying utility and telecom stocks, which are considered safe bets when the market is troubled, and the price of gold has surged. And although stocks have risen this week, the gains in the past three days were small and came in choppy trading.
Warne said investors still feel uneasy about problems, including shaky economies outside the U.S., low oil prices and uncertainty over when the Federal Reserve will raise interest rates and what effect that will have on the economy.
"I think we're going to continue to see a lot of market volatility," she said.
Carmike Cinemas climbed $4.14, or 16.4%, to $29.25 after the announcement that AMC Theaters, owned by Wanda Group of China, is buying the chain for $1.1 billion. The deal will create the biggest movie theater chain in the world. Earlier this year, Wanda said it would buy Legendary Entertainment, a studio that co-financed movies including "Jurassic World" and "The Dark Knight."
Bond prices fell. The yield on the 10-year Treasury note rose to 1.87% from 1.84% late Thursday.
Michael Fredericks, portfolio manager for BlackRock Multi-Asset Income Fund, noted that bond yields have recovered along with stocks over the past few weeks.
"There was just a huge amount of pessimism" about economic growth, he said. He added that bond yields had fallen because investors were worried about the health of Europe's banks and the possibility that the Fed would experiment with negative interest rates in the U.S.
A handful of companies rose and fell as quarterly earnings kept trickling out. Hewlett Packard Enterprise, an information technology products and service firm based in Palo Alto, Calif., reported better-than-expected results from its first quarter as a publicly traded company. Its stock surged $1.84, or 13.5%, to $15.44.
Handgun maker Smith & Wesson rose $1.65, or 6.5%, to $27.05 after its profit and sales surpassed Wall Street estimates. Smith & Wesson also raised its profit and sales projections for its current fiscal year.
Tax preparer H&R Block tumbled after its quarterly profit and revenue disappointed investors. The company said people are filing their taxes later and refunds are taking longer to process as efforts to fight tax fraud increase. The stock dropped $5.14, or 15.6%, to $27.76.
Britain's FTSE 100 gained 1.1%, and France's CAC 40 rose 0.9%. Germany's DAX was up 0.7%. Japan's Nikkei 225 index closed up 0.3%, and Hong Kong's Hang Seng added 1.2%. South Korea's Kospi edged down 0.1%.
In other energy trading, wholesale gasoline rose 3 cents to $1.33 a gallon. Heating oil climbed 4 cents to $1.16 a gallon. Natural gas climbed 3 cents to $1.67 per 1,000 cubic feet.