Image copyright Getty Images Image caption Amazon retail and web services sales rose 25% to $38bn

Amazon sales rose in the second quarter but profits plunged, as the e-commerce giant spent heavily in a bid to become the go-to shop globally for everything from food to television.

The Seattle firm earned $197m (£151m) in profit in the three months to the end of June, down 77%.

The fall came as the company pursues expansion overseas and invests in new products and services, including video.

Expenses increased to $37.3bn, up 28% year-on-year.

Amazon has a reputation for ignoring profits and opting to spend on expansion.

The firm in recent months has announced plans to hire thousands of workers, bringing on engineers, sales teams and workers, while opening new warehouses, data centres and bricks-and-mortar book stores.

Amazon is pushing into new markets, such as India. It has unveiled new versions of its tablet and home robot and announced movies and television shows.

In June the company capped the activity with the announcement that it would buy the Whole Foods supermarket chain for an estimated $13.7bn.

The spending increase - which did not factor in the pending Whole Foods deal - still took investors by surprise. Its share price fell more than 3% in after-hours trade.

'Heads down'

Amazon said business remains healthy. Consumer retail sales in the three months to the end of June totalled $33.9bn, rising 17% overseas and 27% in North America, still the firm's biggest market.

Revenues at its profitable web services division, which sells cloud computing services such as data storage, jumped 42% to $4.1bn.

Image copyright Getty Images Image caption Amazon founder Jeff Bezos briefly became the world's richest man on Thursday

Sales of subscription services - including the Prime membership the firm wants to see widely adopted - rose more than 50%.

"Our teams remain heads-down and focused on customers," said Amazon founder Jeff Bezos.

Capacity and costs

Earlier on Thursday, Mr Bezos briefly became the world's richest man, overtaking Bill Gates as Amazon's share price rose.

But he relinquished the title as Amazon's shares slid lower over the course of the day.

The company on Thursday warned that spending will continue.

Brian Olsavsky, Amazon's chief financial officer, said Amazon is working to increase the capacity of its Fulfillment by Amazon shipping service for third-party sellers.

The web services division has also seen costs grow, as Amazon cuts prices and increases its infrastructure investment. Amazon is expanding those offerings to new countries and faces stepped-up competition from Microsoft and Google.