Chairman Ben Bernanke ended weeks of speculation Wednesday by saying the Federal Reserve will likely slow its bond-buying program later this year and end it next year if the economy continues to improve.

The Fed’s bond purchases have helped keep long-term interest rates at record lows. A pullback in the Fed’s purchases would likely lead to higher rates on mortgages and other consumer and business loans.

Bernanke said the reductions would occur in “measured steps” and that the purchases could end by the middle of next year. By then, he said he thought unemployment would be around 7 percent.

The chairman likened any reduction in the Fed’s $85 billion-a month in bond purchases to a driver letting up on a gas pedal rather than applying the brakes. He stressed that even after the Fed ends its bond purchases, it will continue to maintain its vast investment portfolio, which will help keep long-term rates down.

The ultra-low borrowing rates the Fed has engineered have been credited with helping fuel a housing comeback, support economic growth, drive stocks to record highs and restore the wealth America lost to the recession.

Some investors now worry that higher rates will cause investors to shift money out of stocks and into higher-yielding bonds. Others fear that the economy might not be ready to absorb higher rates and that consumers and businesses could pull back on borrowing.

The Fed issued an updated economic forecast, which sketched a brighter outlook. It said the “downside risks to the outlook” had diminished since fall.

The more upbeat forecast helps explain why the Fed thinks record-low rates may soon no longer be necessary. Low rates help fuel economic growth. But they also raise the risk of high inflation and dangerous bubbles in assets like stocks or real estate.

Speaking of the economy, Bernanke said, “The fundamentals look a little better to us.”

He spoke at a news conference after the Fed ended a two-day policy meeting. After the meeting, the Fed voted to continue the pace of its bond-buying program for now.

Timothy Duy, a University of Oregon economist who tracks the Fed, called the statement “an open door for scaling back asset purchases as early as September.”

The fact that the Fed foresees less downside risk to the job market “gives them a reason to pull back” on its bond purchases, Duy said.

Asked at his news conference whether it will be difficult for the Fed to clearly communicate its plans for scaling back the bond purchases, Bernanke agreed.

“We are in a more complex type of situation,” he said. “We are going to be as clear as we can.”

In its statement Wednesday, the Fed said it would maintain its plan to keep short-term rates at record lows at least until unemployment reaches 6.5 percent.

The Fed also released its latest economic projections Wednesday. Fed officials predicted that unemployment will fall a little faster this year, to 7.2 percent or 7.3 percent at the end of 2013 from 7.6 percent now. They think the rate will be between 6.5 percent and 6.8 percent by the end of 2014, better than its previous projection of 6.7 percent to 7 percent.

The Fed also said inflation was running below its 2 percent long-run objective, but noted that temporary factors were partly the reason. It said inflation could run as low as 0.8 percent this year. But it predicts it will pick up next year to between 1.4 percent and 2 percent.

“The more upbeat tone and the change in the unemployment forecast will only encourage expectations for action soon,” Jim O’Sullivan, chief U.S. economist at High Frequency Economics, wrote in a research note. “We continue to believe that tapering could start at the Sept. 17-18 meeting.”

But David Robin, co-head of the futures and options desk at the brokerage Newedge, said he didn’t think Bernanke’s upbeat assessment matches an economy that’s just “muddling along.”

Investors may suspect the Fed is looking for a reason to scale back the bond purchases, Robin said. “It’s a big mess,” he said.

The statement was approved on a 10-2 vote. James Bullard, the president of the Federal Reserve Bank of St. Louis, objected for the first time this year, saying he wanted a stronger commitment from the Fed to keep inflation from falling too low. Esther George objected for the fourth time this year, again voicing concerns about inflation rising too quickly.

At his news conference, Bernanke declined to address speculation that he will step down as chairman when his term ends in January. He was asked to respond to comments Monday by President Barack Obama, who said Bernanke had already stayed longer than planned. Bernanke avoided the question.

With contriutions from other AP staffers.