The Nokia handsets business that Microsoft is due to take over saw sales continue to slide in the fourth quarter as its Lumia smartphones failed to draw business away from larger competitors like Apple and Samsung.

Microsoft posted its first quarterly loss in its 26 years as a public company on Thursday as it declared a struggling online ad business a bust and prepared for one of the biggest product updates in its history.