LONDON (Reuters) - Britain’s dominant services sector grew unexpectedly quickly last month and businesses are more upbeat about 2018 than they were for much of 2017, but Brexit is weighing on investment plans, a survey showed on Thursday.

The IHS Markit/CIPS service Purchasing Managers’ Index (PMI) rose to 54.2 in December, its second-highest reading since April, beating forecasts in a Reuters poll that it would remain at November’s 53.8.

Along with surveys of construction and manufacturing published this week, the economy looks as if it grew 0.4 to 0.5 percent in the last three months of 2017, faster than in the previous quarter, IHS Markit said.

Official data for most of 2017 showed Britain lagging behind other countries with the weakest year-on-year growth since 2013 in the third quarter. Consumer spending took a hit from high inflation caused by the 2016 Brexit vote and slow wage growth.

However, British retailers - who are not included in the PMI - have so far reported solid sales over the Christmas period.

Major clothing chain Next (NXT.L) said on Wednesday that colder-than-usual weather had given an extra boost to demand.

Thursday’s PMI data showed that services firms were upbeat about 2018. More than 40 percent expect stronger sales this year, and just 10 percent see a fall, the most optimistic split since May.

“However, as has been increasingly the case in recent months, the good news comes with a health warning about the sustainability of the upturn,” said Chris Williamson, IHS Markit’s chief economist.

The inflow of new orders slowed to its weakest since August 2016, partly due to worries about the terms on which Britain will leave the European Union in March 2019, IHS Markit said.

“Digging into the details behind the resilient strength signaled by the headline numbers, the survey data reveal an economy that is beset with uncertainty about the outlook, which is in turn dampening business spending and investment,” Williamson said.

The survey showed companies hired people at the slowest rate since March 2017, while input costs rose at their fastest in three months.

“There were also reports that uncertainty about the path to Brexit continued to weigh on growth, particularly in terms of clients’ willingness to commit to new projects,” Markit said.

The survey was conducted from Dec. 5 to 19, so included responses both before and after Prime Minister Theresa May gained agreement from the EU to move Brexit talks on to discuss transitional arrangements and a longer-term trade deal.