Online retailer Amazon trimmed its losses in the three months to September after action to turn around its fortunes paid off with a better than expected surge in sales.

The United States-based group posted losses of 41million US dollars (£25.3m) for the third quarter, down sharply on the 274m dollars (£169m) loss seen a year earlier as sales leapt 24%.

Amazon, the world’s largest online retailer, which has more than 6,000 permanent staff across its UK operations, has now posted three quarters in a row of losses after ramping up investment, but cheered investors as it said it expected fourth quarter sales to rise by another 10% to 25%.

There were also forecast-beating earnings from technology titan Microsoft overnight after the US software group reported a 17% rise in third quarter net income to 5.24billion dollars (£3.2bn).

Shares rose in after-hours New York trading for both firms following the robust figures, up 6% for Microsoft and 8% for Amazon.

Amazon boss Jeff Bezos said it had been a “busy few months” for the group after launching new Kindle e-readers and tablets, as well as expanding its warehouse network to reduce shipping costs and adding robots to boost efficiency in delivering orders.

The group gave no break-down on figures for the UK, but Amazon.co.uk managing director Christopher North moved to defend the firm against criticism over taxes paid in Britain and the threat to high street rivals.

He told the Daily Telegraph that the group’s growth was “really good for the UK”, with more than £1 billion invested in Britain and £1 billion handed to delivery firms in the past five years.

He added Amazon had paid more than £500 million in VAT to the Treasury over the past year.

The group, which launched in the UK 15 years ago, said top sellers in Britain over the third quarter were video game releases Grand Theft Auto 5 and FIFA 14, as well as Kindle books such as books ‘Single Woman Seeks Revenge’ by author Tracy Bloom.

Microsoft’s figures came as speculation continues to swirl over who will replace outgoing chief executive Steve Ballmer.

He announced in August that he would step down within 12 months, but the group gave no update on the search for his successor with the third quarter figures.

The group said revenues rose 16% in the quarter, with sales of its Surface tablets hitting 400m US dollars (£247m) as price cuts helped more than double sales quarter on quarter in a sign that it is beginning to recover after initial sluggish demand.