Associated Press photoBP Chairman Carl-Henric Svanberg, left, speaks to reporters outside the White House in Washington, Wednesday, after a meeting with President Barack Obama. Standing behind Svanberg is BP Chief Executive Officer Tony Hayward, third from right, BP Managing Director Bob Dudley, second from right, and BP America Chief Executive Officer Lamar McKay, right. Later in the day the company announced suspension of its divideneds.

NEW YORK – BP’s agreement to put $20 billion into a fund for victims of the Gulf of Mexico oil spill lifted the stock market off its lows and sent the major indexes to a narrowly mixed finish.

The oil company also said it has canceled a dividend payment totaling about $2.6 billion that was scheduled for June 21. It also won’t declare a dividend for the second and third quarters. Investors saw the news as an end to the uncertainty about BP’s stability, and that helped steady the overall market. The Dow Jones industrial average rose about 4 points, while the Standard & Poor’s 500 index fell less than a point and the Nasdaq composite index was virtually unchanged.

BP’s plans to place $20 billion in a fund to compensate victims was announced after a meeting between BP executives and President Barack Obama at the White House. Traders had been questioning how BP will handle the mounting costs of the spill, which began April 20 when a rig operated by BP exploded.

“One source of uncertainty has been at least partially resolved,” said Brian Gendreau, a market strategist with Financial Network Investment Corp.

The market began the day lower after home construction and applications for building permits slumped in May following the end of a homebuyer tax credit. Meanwhile, a disappointing profit forecast from FedEx Corp. raised questions about the economic recovery. The package delivery company is seen as a barometer of the economy because shipping demand tends to increase as business conditions improve. The stock fell 3.5 percent.

The government’s report on housing raised concerns that weaker demand for homes will hurt an economic rebound. Construction of homes and apartments fell 10 percent from a month earlier to an annual rate of 593,000, well below the 650,000 economists had forecast. A 17 percent drop in construction of single-family homes was the largest since January 1991.

Applications for building permits fell 5.9 percent to the lowest level in a year. Analysts had forecast an increase. Demand for permits is an indicator of future homebuilding activity.

The weaker-than-expected numbers come after a homebuyer tax credit expired in April.

Kevin Smith, a housing market analyst at Chapdelaine Credit Partners in New York, said the drop in the home construction and permit numbers extends a string of choppy readings since October, and that it’s too soon to tell how housing will hold up. He noted that the prior month had been the best in more than two years.

“It’s going to be a bumpy ride,” Smith said. He said housing won’t make a strong recovery until unemployment falls and overall confidence grows.

According to preliminary calculations, the Dow rose 4.69, or 0.05 percent, to 10,409.46, its fourth advance in five days. On Tuesday, the Dow ended above its average close of the past 200 days for the first time since May 19. Finishing above that level is seen as a sign of strength.

The S&P 500 fell 0.62, or 0.06 percent, to 1,114.61, and the Nasdaq crept up 0.05 to 2,305.93.