However, growth slowed in June, according to the purchasing managers’ index (PMI), a survey of businesses by S&P Global.
The UK’s PMI fell from 53 in May to 51.7 in June. Any score of above 50 indicates growth, so this score shows a slowdown in private sector activity.
Manufacturing and construction companies reported strengthening demand, but this was more than outweighed by a slowdown in the services sector.
Although consumers appear willing to spend money, employers said some spending decisions are being put on hold by uncertainty around the election.
Chris Williamson, chief business economist at S&P Global Market Intelligence, said the survey indicates the economy is growing at a quarterly pace of around 0.1pc.
Separate data published on Friday showed retail sales jumped 2.9pc in May from a month earlier as shoppers returned to the high street after a wet April. Compared with a year earlier, sales rose 1.3pc, the strongest annual increase since early 2022.
The ONS said clothes sales drove the monthly improvement, rising by 5.4pc.
Oliver Vernon-Harcourt, head of retail at Deloitte, said: “The tide could be finally turning for retailers, with more consumers releasing their purse strings and spending on discretionary items such as clothing and furniture.”