NEW YORK - A two-day rally in the stock market came to an end Thursday afternoon when an account of the Federal Reserve's last meeting revealed a split between bank officials over how long the Fed should keep buying bonds to support the economy.

The Dow Jones industrial average and the Standard & Poor's 500 index treaded water for much of the day, then slid into the red around 2 p.m. Eastern, after the Fed released the minutes from its December meeting.

The Dow ended with a loss of 21.19 points at 13,391.36.

The S&P 500 lost 3.05 points to 1,459.37 and the Nasdaq composite fell 11.69 to 3,100.57.

At last month's meeting of the Federal Reserve's policy-making committee, the central bank pledged to buy $85 billion of Treasurys and mortgage-backed bonds and also keep a benchmark interest rate near zero until the unemployment rate drops below 6.5 percent.

On Thursday, the minutes from that meeting showed Fed officials were divided over the bond purchases. Some of its 12 voting members thought they should continue through this year, while another group thought they should be slowed or stopped much earlier. Just "a few" members saw no need for a time frame, according to the minutes.

"It's pretty surprising," said Thomas Simons, market economist at the investment bank Jefferies. "I think everybody thought there was broad agreement on policy, but now it seems like few of them really wanted to vote for it."

The stock market opened on a weak note after retailers reported mixed holiday sales and as the prospect of a new budget battle in Congress loomed. UnitedHealth Group led the Dow lower. The insurance giant's stock fell $2.55 to $51.99 after analysts at Deutsche Bank and other firms cut their ratings on the stock.

"It's natural to relax a bit after such a huge day as yesterday," said Lawrence Creatura, who manages a small-company fund at Federated Investors.

The Dow soared 308 points Wednesday, its largest point gain since December 2011. The rally was ignited after lawmakers passed a bill to avoid a combination of government spending cuts and tax increases called the fiscal cliff.

That deal gave the market a jump start into the new year. The Dow and the S&P 500 are already up more than 2 percent.

"We're off to a very strong start," Creatura said. "The dominant reason is the resolution of the fiscal cliff. But January is usually a strong month, as investors all shift money into the market at the same time. When the calendar flips, it's as if you're allowed to begin the race anew."