Image copyright Getty Images Image caption The iPhone 6 has proved popular with consumers worldwide

US technology giant Apple raised a better than expected $6.5bn (£4.3bn) through a corporate bond sale, as part of a plan to return cash to investors.

Monday's bond sale was Apple's third such sale in as many years and was just over half the $12bn the company raised in April 2014.

The California-based firm plans to return more than $130bn to shareholders by the end of this year.

The move comes despite the company sitting on a cash pile of $178bn.

Some of the bonds are set to mature in five years, while others will not do so for another three decades.

Analysts have said that Apple could increase the amount it returns to its investors to as much as $200bn over the next three years.

Even when Apple's $35bn of debt is taken into account, it still has $142bn in cash.

Almost 90% of the cash is held outside the US, and it would have to pay the top corporate tax rate of 35% if it returned the money from abroad, which is why it is borrowing the money instead.

'Upsize it'

Apple is rated by Moody's as Aa1, the second-highest available, and bonds from companies with high credit ratings are popular with investors.

Deutsche Bank and Goldman Sachs are the banks managing the capital-raising.

Last week, Apple reported a record quarterly profit for a public company of $18bn for the three months to 31 December, with revenue up almost 30% to $74.6bn after the new iPhone 6 proved a huge hit with consumers globally.

Shares in Apple closed up 1.25% to $118.63 in New York on Monday, valuing the company at about $684bn.