Royal Bank of Scotland was handed a £390m fine on Wednesday for "widespread misconduct" in rigging the Libor rate until as recently as November 2010, two years after it was bailed out by the taxpayer and even after regulators had begun to investigate the key benchmark rate.

Regulators found that corrupt payments of more than £100,000 were made to those involved and that the bailed-out bank had "abetted" Swiss bank UBS – fined £940m – in manipulating the rate used to set prices on £300tn of financial contracts around the world, from ordinary household mortgages to business loans.

"This is another day of shame for Britain's banks," Greg Clark, the financial secretary to the Treasury, told MPs.

One electronic exchange shows an RBS employee responsible for submitting official Libor rates joking: "I'm like a whores' drawers." A broker is quoted as saying to an RBS Libor submitter: "I'll send lunch around for everybody."

Stephen Hester, the chief executive of RBS, condemned the behaviour of 21 "wrongdoers" at the bank who have either left or been disciplined. Six of them remain employed. Another eight staff left before any action was taken against them.

"This whole episode deeply disgusts me and depresses me. It is an extreme example of a selfish and self-serving culture," said Hester, who was appointed to run RBS after it received a £45bn taxpayer bailout in 2008.

The chairman, Sir Philip Hampton, described it as a sad day and made clear that the bank did not intend to claw back the £2m bonus Hester had been awarded for 2010 – £700,000 of which is due to be paid next month.

Defending Hester's position, Hampton described the situation as "tough" on John Hourican, the head of the investment bank, who is to leave "in recognition of the management issues" and the impact on the bank's reputation. Hourican leaves with a payoff of £750,000 but forfeits £4m of bonuses.

Hampton added: " A small group of people in our company have exposed the organisation to considerable reputational damage. As at other banks, it has been revealed that pockets of individuals in this company seemed to have lost touch with basic principles of right and wrong."

Hampton said the bank had been in "a hell of a mess" when the new management team arrived in 2008. "It was an absolutely horrendous mess," said Hampton.

In total, the bonus pot at RBS is to be reduced by £300m to cover the cost of the fine and some 1,500 bankers are to have bonuses clawed back following the intervention of the chancellor, George Osborne, who wanted to ensure that any fines to the US regulators, amounting to £300m of the £390m total, were not paid by UK taxpayers.

"What happened at RBS and other banks is totally unacceptable," said Osborne. "At my insistence, the bankers, not the taxpayers, will pick up the bill. Those people who did wrong will face the full force of the law … In 2013 our reforms are turning people's anger into a positive force for change."

Officials at the Unite union called on the bank to ensure that branch staff did not pay for the fine with their jobs: "Innocent bank staff must not be allowed to carry the can for the rate riggers."

Two US regulators – the Commodity Futures Trading Commission and the US department of justice – have fined RBS $325m (£207m) and $150m (£95m) respectively, while the fine levied by the UK Financial Services Authority is £87.5m. This would have been substantially higher if RBS had not co-operated.

Hester warned that the Libor fine "will not be the last reminder of the scale of the changes that need to be made" inside the nationalised bank.

US authorities are investigating money-laundering offences and the Libor investigation is continuing in Japan and Switzerland.

As part of the agreement with the department of justice, the bank has entered into a deferred prosecution agreement while its Japanese subsidiary has entered a plea of guilty to one count of wire fraud relating to yen Libor.

Hester, describing his four years at the bank as a "soap opera", said: "I can be dismissed if it's judged I haven't done a good job or if someone else can do a better job." I've made it clear to key stakeholders that if they don't have confidence in me, then my job is not doable."

Hester insisted that he wanted to "finish the job" of getting RBS back on the road to recovery.

Lord Oakeshott, the Liberal Democrat peer, said: "Hester has been far too slow to clear up [former RBS chief executive] Fred Goodwin's poisonous legacy. He can't conceivably keep a £2m bonus for a year when he ran a Libor-rigging bank."