The Federal Reserve closed a chapter in its long-running stimulus campaign on Wednesday and pivoted to the even bigger challenge of deciding when to raise interest rates after six years of easy money.

The central bank slashed its benchmark interest rate to zero when the nation was in the grips of the financial crisis in 2008 and has kept it there ever since. The move has helped keep interest rates low on a wide range of loans - from mortgages to corporate borrowing - helping push the economy out of recession and into a strengthening recovery.

But with the announcement Wednesday that the Fed would end its $3 trillion bond-buying program often described as a “booster shot” for the economy, the central bank now will turn more sharply toward a serious discussion of when to raise rates.

“The moment has clearly come to take the monetary training wheels off the economy,” said Bernard Baumohl, chief global economist at The Economic Outlook Group.

The debate over when to raise rates, which has already begun, will prove tricky for the Fed — and likely the biggest challenge of Janet Yellen’s tenure since she took over as head of the central bank early this year. Fed officials, who have suggested that the move could come in the middle of next year, hope that it causes little disruption.

But achieving that delicate balance is the most basic dilemma of central banking. If the Fed moves too soon, it could undermine the recovery. If it waits too long, it could breed the next financial bubble as investors take too many risks backed by the belief the Fed will always be stimulating the economy.

When Fed officials suggested in the past that they may withdraw stimulus from the economy faster than anticipated, markets have swooned and interest rates have popped up. That’s one reason central bank officials have been preaching patience in responding to the strengthening recovery — but some investors believe they will not be able to wait much longer.

“Today’s statement shows the Fed believes the economy is nearing the final stages of full recovery,” said Chris Rupkey, chief financial economist at Bank of Tokyo-Mitsubishi. “They halted the [bond] purchases today, and tomorrow, rate hikes are coming. Bet on it.

The Fed’s stimulus efforts aimed to bolster the economy in part by making a wide range of loans more affordable for ordinary Americans. Today, auto sales, fueled by low interest loans, are one of the bright spots of the recovery, helping create jobs in the manufacturing industry. Mortgage rates also remain low, helping keep the housing market afloat.

Ideally, the increase in the Fed’s benchmark interest rate would coincide with a more robust recovery. Businesses would be hiring, wages would be rising, and households would be able to digest an uptick in the cost of borrowing. But judging that moment - and managing the unpredictable responses of investors around the world - could prove difficult.

On Wednesday, the central bank hedged its bets. In typical Fedspeak, the central bank said in its official statement that it would wait a “considerable time” after ending bond purchases this month to raise rates — the same language it has used since March. Officials have been careful to emphasize that the timing of their decision will be calibrated to the health of the economy.

The Fed dropped its benchmark for short-term interest rates to zero in 2008, shortly after launching its first round of purchases of long-term bonds worth $500 billion. The program effectively pumped money into the economy in hopes of propping up the mortgage market. The central bank has conducted another two rounds of purchases.

In the most recent effort, launched in fall 2012, the central bank promised to keep buying bonds until it was convinced the job market was on the road to recovery. The price tag reached more than a trillion dollars before the Fed voted Wednesday to wrap it up.

“There has been a substantial improvement in the outlook for the labor market,” the central bank said in its official statement. And it expressed confidence that there is “sufficient underlying strength in the broader economy to support ongoing progress toward maximum employment in a context of price stability.”

But though there is general agreement that the recovery is gaining strength, there is still significant debate — both inside and outside the central bank — over when and how to respond.

As the Fed’s stimulus campaign grew bigger and bigger, the chorus of critics who worried years of easy mopney could distort markets and create financial instability grew louder and louder.

But the central bank faces pressure from the other side as well. One top official, Minneapolis Fed President Narayana Kocherlakota, opposed the central bank’s decision Wednesday. He argued that the Fed should maintain its bond-buying program and commit to keeping interest rates at zero to combat low inflation, which could be a sign of underlying economic weakness.