Britain’s economy sunk into a recession at the end of last year, capping off a year of economic strain in which interest rates were pushed to their highest level in a decade and a half to stamp out high inflation.

Gross domestic product contracted 0.3 percent in October to December from the previous quarter, when the economy shrank by 0.1 percent, the Office for National Statistics said on Thursday. Weak retail sales, a fall in restaurant and other food services, and a drop in housing construction all weighed on Britain’s economy, the statistics agency said.

Britain’s prime minister, Rishi Sunak, pledged to grow the economy last year as one of five promises he wanted voters to judge him by. Instead, the economy slipped into a recession. (Two consecutive quarters of economic decline is commonly considered a recession, though other factors such as the depth of decline and job losses are also important considerations.) Overall, in 2023 the economy grew just 0.1 percent compared with 2022.

While Thursday’s data is subject to revision as more information about the economy is collected, it paints a picture that Britain, like the eurozone, has been experiencing little or no growth for much of the past year. By some measures, this weak data can be seen optimistically. Europe’s economies, including Britain, have proved more resilient than expected, averting the more dire recession warnings of early 2023.

The lackluster economy has still proven challenging for the households and businesses contending with relatively high costs and rising loan repayments. And it’s in contrast to the United States, where economic growth has surged, with the economies on either side of the Atlantic diverging as they try to put the recent bout of high inflation firmly in the past.

Thursday’s G.D.P. report was the last in a trio of key economic data about the British economy published this week. On Tuesday, the nation’s statistics office reintroduced official estimates for unemployment and other labor market measures after a four-month hiatus because of difficulties collecting data. It showed that the labor market was tighter than previously thought, with the unemployment rate at 3.8 percent at the end of last year. Wage growth was about 6 percent.