Inflation in Britain rose slightly in December, picking up for the first time in almost a year, after a change in tobacco taxes pushed up prices.

Consumer prices rose 4 percent in December from a year earlier, up from 3.9 percent the previous month, the Office for National Statistics said on Wednesday. Despite the unexpected uptick, inflation is still near its slowest pace in two years and well below where the nation’s central bank thought it would end 2023.

About a year ago, with inflation above 10 percent, Prime Minister Rishi Sunak made several pledges to the British public on the economy, migration and the health service. Wednesday’s data confirms that he met one of those — to cut Britain’s inflation rate in half. It’s a much-needed win for the government as it begins an election year with Mr. Sunak’s political party trailing in the polls.

But even as households may be relieved that prices aren’t rising as quickly, the cumulative impact of high inflation is still being felt. For example, food and nonalcoholic drink prices are up 26 percent in the past two years.

Mr. Sunak’s aim was to see the inflation rate halved but the Bank of England, which is responsible for controlling inflation, has a mandate to bring it all the way down to 2 percent and has raised interest rates aggressively to do so.

The situation appears to be changing quite quickly now. Inflation could drop to 2 percent as soon as the spring, around April or May, according to economists at Goldman Sachs, ING, Oxford Economics and elsewhere. That would bring it to the target about a year and a half earlier than the Bank of England recently forecast.