NEW YORK -- Stocks surged on Friday, lifting the S&P 500 to within reach of a record, after the government reported an encouraging burst of hiring last month, a relief for investors after a dismal report in May.
The gain of 287,000 jobs in June, which the Labor Department reported early Friday, was far more than economists were expecting.
The unemployment rate edged higher as more people started looking for work, another positive sign for the economy.
The Standard & Poor's 500 index (SPX) gained 32 points, or 1.5 percent, to 2,129.90, less than a point shy of its May 21, 2015, record finish of 2,130.82 reached on May 21, 2015. The index exceeded that level intraday.
The Dow Jones industrial average (I: DJI) rose 251 points, or 1.4 percent, to 18,147.
The Nasdaq composite (COMP) rose 80 points, or 1.6 percent, to 4,957.
Retailer Gap (GPS) climbed after it said sales at older stores grew in June as Old Navy results improved. Sales at those stores are considered an important measure of retailers' results, and Thomson Reuters said it was the first improvement in that gauge for Gap in more than a year. Analysts expected another decline this month.
Stocks are trading at their highest prices in just under a year, but investors remained cautious. They continued to buy bonds, sending prices up and the yields on long-term notes lower. The yield on the 10-year Treasury note fell to 1.37 percent from 1.39 percent. The yield on the 30-year Treasury bond dipped to 2.11 percent from 2.14 percent. Both have set all-time lows in recent days.
The price of gold continued to inch lower, while silver prices rose.
Drug developer Juno Therapeutics (JUNO) said it halted a mid-stage study on a potential leukemia treatment following the deaths of two patients. The study involved the company's most advanced experimental drug, and Juno said the deaths of the patients came after an additional chemotherapy drug was added to their treatment.
Material and machinery companies made the largest gains. Paint and coatings maker PPG and industrial gas maker Air Products and Chemicals rallied. Aluminum producer Alcoa and machinery maker Caterpillar both climbed, along with aerospace company Boeing (BA).
Bank stocks also climbed. If reports show the economy is on surer footing, the Federal Reserve is more likely to raise interest rates later this year, and that would help banks make bigger profits on mortgages and other lending. Banks are the only S&P 500 industrial sector in the market that's still lower for the year.
Cloud-based security and storage service company Barracuda Networks reported solid quarterly results and raised its projections for the year.
Energy prices were slightly higher. Benchmark U.S. crude added 21 cents to $45.35 a barrel in New York. Brent crude, a standard for international oil prices, picked up 26 cents to 46.66 a barrel in London.
Utility and phone companies and household goods makers didn't move as much as other stocks, but they still traded a bit higher. Those stocks, considered some of the safest investments available, have outperformed the market this year as investors looked for protection.