Four former Barclays executives have appeared in court charged with fraud in relation to the multibillion-pound rescue of the bank by Qatar during the 2008 financial crisis.

John Varley, the former chief executive of Barclays, is the first boss of a major bank to face a jury trial over alleged crimes during the global financial crisis a decade ago.

Ed Brown QC, prosecuting on behalf of the Serious Fraud Office, said the case would examine “how those at the very top of the bank responded to the pressure that it created”.

As the trial, which is expected to last four to six months, began at Southwark crown court on Wednesday, the judge Mr Justice Robert Jay told the jury to to put aside their feelings towards bankers and the damage the financial crisis caused to society.

“The backdrop of this case is the global financial crisis of 2008,” Brown told the jury. “The first obvious and outward sign of it, at least to the UK public, was the closing of the doors of the bank Northern Rock in 2007. However, the crisis in the UK and across the world worsened and deepened as time went on and into 2008.”

Brown alleged that Varley, and the other former Barclays bosses, made secret payments to Qatar in order to secure investment from the Gulf state and therefore avoid a UK government bailout.

Brown said the Barclays executives were “very anxious” about controls the government would impose on Barclays if it had to accept a taxpayer bailout like Lloyds Bank and Royal Bank of Scotland.

“Those at the top of Barclays were very anxious to avoid accepting government money, thereby placing itself under greater government control and scrutiny,” Brown said. “It is no exaggeration to say that Barclays’ future as an independent bank was in jeopardy in September and October of 2008.”

Brown said the Barclays bosses determined that the way to avoid a government bailout was to raise investment via a capital raising – selling a stake in the bank to investors.

He said it was normal for investors to be paid fees associated with capital raisings, but the Barclays bosses paid extra and hidden fees to Qatar that were not available to other investors.

“It is the hiding of these additional commission fees which lies at the heart of this case and the conspiracies alleged against the defendants, disguising and hiding extra fees to the tune, ultimately, of a total of nearly a third of a billion pounds,” he said.

“It was very clear to the defendants that the only way of securing the Qataris’ investment, but also avoiding paying others at the same rate or looking weak to the market, was to pay the money demanded by the Qataris [and] to hide the true position from the market,” Brown said.

All four defendants deny the charges and state that the extra fees were paid for genuine advisory services agreements (ASAs) provided by the Qatari investors.

Brown said the ASAs were “nothing more than a smokescreen” to try to “legitimise what had gone before”.

“Those agreements were in truth not genuine agreements of services,” Brown alleged. “They were dishonest mechanisms to hide additional fees being paid to the Qataris for their investment.”

Brown said the men conspired to commit the alleged fraud, and were motivated by their desire to secure the future of the bank as well as concern about the scale of their personal bonuses.

“There were also obvious personal motivations for the individual conspirators,” he said. “The security of their jobs and the very large bonuses that they might receive in addition to their salaries were in jeopardy if the future and the security of the bank was in doubt, or placed in the hands of the UK government.”

Sign up to the daily Business Today email or follow Guardian Business on Twitter at @BusinessDesk

The four men – Varley, who was CEO of Barclays between 2004 and 2011; Roger Jenkins, the former head of the investment banking division Barclays Capital; Tom Kalaris, who was boss of Barclays’ wealth management division; and Richard Boath, the former head of its European financial institutions group – were charged with conspiring to commit fraud by making false representations. Varley and Jenkins face an additional charge related to a second round of fundraising.

Barclays former finance director Chris Lucas was also named as a co-conspirator, but is suffering from a serious illness and will not stand trial.

The trial at Southwark crown court in central London continues.