Danish toymaker Lego has posted its first fall in annual earnings and sales since 2004 after seeing profits tumble 18% in a “challenging” past year.

The group admitted it had put in a disappointing performance as it reported pre-tax profits of 10.2 billion Danish krone (£1.2 billion) against 12.4 billion Danish krone (£1.5 billion) the previous year.

The launch of the Lego Ninjago movie and strong demand for Lego Star Wars products failed to halt a sales slide, with revenues down 8% to 35 billion Danish krone (£4.2 billion).

It marked the first fall in both sales and profits since the group’s woes in 2003-2004.

But the plastic brick giant said it was focusing on “stabilising” the business in 2018 and had started to see the green shoots of recovery at the end of last year.

Niels Christiansen, Lego Group chief executive, said: “2017 was a challenging year and overall we are not satisfied with the financial results.

“However, we ended the year in a better position.”

He added: “We started 2018 in better shape and during the coming year we will stabilise the business by continuing to invest in great products, effective global marketing and improved execution”.

But he stressed there was “no quick-fix”.

Mr Christiansen has been lashing costs and overhauling the group in an effort to boost flagging sales, announcing 1,400 job losses last autumn – cutting its workforce by 8%.

He said these “difficult actions” were now complete.

The group employs around 900 staff in the UK.

It has previously said the group needed a “reset”, having become increasingly complex over the past five years, making it harder for Lego to grow.

Despite falling annual sales, the overhaul started to bear fruit in 2017 as total consumer sales across a number of its markets improved, particularly in the final months of the year, according to Lego.

Overall consumer sales were flat in the year and grew in seven of its 12 largest markets in December.