US stocks edged higher overnight as energy companies climbed with the price of oil.
Stocks had opened lower but gradually recovered to finish at their highest levels of the day.
The price of oil jumped after the US government said petrol stockpiles shrank last week.
A survey also showed private US business payrolls grew by 179,000 in July as retailers and shipping firms hired more workers.
“So much of this (economic) recovery could be correctly categorised as slow but steady,” said Mike Baele, senior portfolio manager with US Bank’s private client reserve. “It’s all better than last year, for the most part, but it’s also all below expectations.”
The Dow Jones industrial average broke a seven-day losing streak and added 41.23 points, or 0.2%, to 18,355.
The Standard & Poor’s 500 index gained 6.76 points, or 0.3%, to 2,163.79. The Nasdaq composite rose 22 points, or 0.4%, to 5,159.74.
The employment survey by payroll processor ADP suggests employers continue to hire new workers, and at a faster pace than they were this spring, when hiring slowed sharply.
The Labour Department is to release a report on Friday that includes hiring by government as well as private companies. Experts think it will show a gain of about 175,000 jobs.
The price of crude oil jumped after the US government said stockpiles of petrol shrank by more than three million barrels last week.
S&P Global Platts said that was far more than expected and that total oil production also decreased slightly.
That helped oil bounce back from the slump that has taken it from 50 US dollars (£37) a barrel in early June down to around $40.
Benchmark US crude added $1.32, or 3.3%, to $40.83 a barrel in New York.
Brent crude, which is used to price international oils, rose $1.30, or 3.1%, to $43.10 a barrel in London.
That translated into big gains for energy companies. Williams Cos. rose $1.71, or 7.1%, to $25.67 and Devon Energy gained $1.88, or 5.2%, to $38.
Financial stocks also traded higher.
Insurance company American International Group jumped following a strong second-quarter report. AIG stock rose $3.96, or 7.3%, to $58.10.
Intercontinental Exchange, owner of the New York Stock Exchange and other stock markets, said it will split its stock 5-for-1 and buy back $1bn in shares. Its stock rose $14.09, or 5.3%, to $278.02.