LISBON, Feb 3 (Reuters) - Portugal sold on Wednesday a 3 billion euro benchmark 30-year bond with strong demand from both insurance firms and pension funds, allowing the highly indebted nation to diversify its funding sources and reduce its average debt cost.

Demand reached 40 billion euros ($48.1 billion), or over 13 times the amount of the bond on offer, which expires in April 2052, the finance ministry said in a statement. The interest rate was set at 1.022%, it added.

"Portugal had never managed to achieve such favourable financial conditions for a bond with such long maturity, representing significant savings for the country and for taxpayers," the ministry said.

The bond issuance was a "success" and attracted "real money investors", it said, adding that it also "contributed positively to an extension of average maturity and to a decrease in the average cost of total debt".

Portugal's government bonds issued during 2020 had an average maturity of around 10 years and an average cost of 0.6%.

Portugal, which needed an international bailout amid a debt crisis in 2011, is one of the euro zone's most indebted countries. Its public debt hit a record of nearly 135% of gross domestic product last year. The government hopes to cut it to 130.9% this year.

($1 = 0.8319 euros) (Reporting by Sergio Goncalves; Editing by Catarina Demony and Jan Harvey)