Barclays and HSBC shrugged off the near-collapse of the financial system to report combined half-year profits of almost £6 billion today.

The duo - which both avoided taxpayer support at the height of last autumn's crisis - posted profits of nearly £3 billion each, mainly due to strong investment banking results.

But both banks also bore the scars of almost £13 billion in bad debts as consumers and businesses hit by recession default on loans.

Barclays' write-downs rose 86% to £4.56 billion, while HSBC's were up 39% to 13.9 billion US dollars (£8.3 billion).

Shares in both banks gained 6% today - helping push the wider FTSE 100 Index 1.5% higher - as both bucked the impact of a global downturn.

Barclays said it had made a "good start" to 2009 as it sought another year of "solid profitability". HSBC said the results proved its ability to make profits "even in challenging market conditions".

Barclays lent around £17 billion to UK households and businesses in the first half of the year, while HSBC lent £6.7 billion of £15 billion committed for new mortgage lending in the UK. But the duo were among several major banks called in by Chancellor Alistair Darling for "robust" discussions on lending last week as the UK's credit-starved economy thrashes in recession.

Liberal Democrat Treasury spokesman Vince Cable said: "The rates charged by lenders is doing terrible damage to the British economy and ultimately the banks themselves. It's ultimately a very short-sighted and selfish approach.

"If it wasn't at the expense of the rest of the economy one wouldn't be complaining about it, but it is."

HSBC - which saw profits fall 63% to 9.3 billion dollars (£6.5 billion) last year - bolstered its finances with a record £12.5 billion rights issue in March.

Barclays - which has raised cash from the Middle East - has also agreed the sale of its BGI asset management division.

Barclays' figures revealed a 36% jump in staff costs to £4.8 billion - led by a 32% jump in salaries and bonuses at investment banking arm Barclays Capital, after it bought the US division of failed Lehman Brothers. HSBC also reported a rise in performance-related pay at its Global Banking and Markets operation.

The investment banking bonanza - with both banks doubling their profits from the activity - and the international spread of the pair helped insulate them from the worst of the recession at home.

Barclays' UK retail banking business, which includes the Woolwich, saw a 61% fall in profits to £268 million, after bad debt provisions jumped 63% to £469 million - despite the bank making bigger margins on its mortgages.

HSBC's profits, meanwhile, overcame more woe at its US consumer lending business, which has been devastated by the credit crunch and is being wound down by the bank.

The division posted a 2.9 billion US dollar pre-tax (£1.7 billion) loss for the period, although bad debts were rising at a slower rate than expected after efforts in previous years to cut down on higher risk loans.

Barclays chief executive John Varley said the bank had remained "independent and profitable" despite the "humbling experience" of the past two years.

HSBC chairman Stephen Green said the bottom of the cycle in financial markets was likely to have been reached, but also warned: "The timing, shape and scale of any recovery in the wider economy remains highly uncertain."

The pair are however likely to boast the strongest figures from a key week for the banking sector.

Nationalised Northern Rock is likely to post more losses tomorrow, while Royal Bank of Scotland and Lloyds Banking Group - 70% and 43% taxpayer-owned - are also set to post far gloomier figures.

Stockbroker Hargreaves Lansdown said HSBC was "underlining its credentials as a major force in the world of global banking" with today's results.

The broker said further write-downs could put pressure on Barclays, but added: "The bank's decision to plough its own furrow without aid from the Government has to date served it well."