In 1337, Ambrogio Lorenzetti set about painting a series of frescoes in the town hall of Siena. Over three walls, they detail the effects of good – and bad – governance on the Tuscan city-state. On the one hand they depict justice, prudence and temperance presiding over a prosperous and secure community; on the other, deceit, fraud and fury.

Sadly for the Sienese of 2013, it is the latter vision that currently carries more resonance. Six and a half centuries later, a scandal over loss-making derivatives contracts and alleged fraud at Monte dei Paschi di Siena (MPS) – the world's oldest bank, which has been in the city almost as long as the frescoes – has stunned locals and thrust the institution into the international spotlight.

This week MPS was forced to ask for a near-€4bn (£3.5bn) taxpayer bailout. Without the cash – which will be the bank's second bailout in four years – the 540-year old institution might have become another chapter in Siena's rich history.

"It's a big problem; for this city, it's immense," said Roberto, a retired employee of the bank, Italy's third largest. "We don't know where it's going to end – for Siena, or for the bank – because, of course, it's all connected."

In recent weeks locals have watched with incredulity as their bank found itself at the centre of a storm that has pulled in the government, the Bank of Italy, the centre-left Democratic party (PD) and even Mario Draghi, head of the European Central Bank.

Raising questions about the oversight of Italy's banking system and MPS's close ties with local government, the affair has dominated the political debate just weeks before the country goes to the polls in its most important election in years.

On Thursday Standard & Poor's downgraded the bank's long-term credit rating from BB+ to BB and on Friday, amid growing unease about how the scandal will affect Italy's image with international investors, President Giorgio Napolitano warned all involved to be "aware of the national interest".

Quite how Montepaschi – as it is commonly known – found itself in its current predicament is a long and complex story, and it is likely to be a while before it is explained fully. But the roots of the problem can be dated back to 2007, when it acquired rival bank Antonveneta from Santander of Spain.

The deal, the latest by a fiercely proud regional bank which since the mid-1990s had been desperate to expand in order to fend off its own acquisition, secured MPS's position as a big player in Italy. But it came at a cost – one which, even at the time, was considered too high: MPS paid €9bn for the rival Italian bank, €2.4bn more than Santander had paid only a short time before.

"This was where Montepaschi started to be doomed," said one banker, formerly of MPS, who spoke on condition of anonymity. "Antonveneta was the last-ditch attempt to become too big either to fail or to be bought."

Whatever the reasons for the inflated price, the deal put MPS under serious pressure just as the financial crisis was starting to hit.

Prosecutors in Siena are now investigating allegations of bribery relating to the deal, as well as possible accounting malpractice connected to derivatives deals losses from which the bank's former management is alleged to have hidden. They could total more than €700m, and, in order to cover those and to recapitalise the bank to healthy levels, MPS has asked for a second state bailout of €3.9bn.

Unsurprisingly, Mario Monti's technocratic government has come in for criticism from voters for propping up the bank while turning the screws on austerity-weary ordinary people. But, owing to the particular nature of MPS, it is the election frontrunners, the centre-left PD, who have been hurt most.

Siena is in the heartland of "red" Italy: its town hall, its province and the region of Tuscany around it are all run by the PD, and it is they who put forward most members of MPS's charitable foundation – which in turn picks half of the board of the bank itself.

In Siena, "Daddy Monte" doled out cash to the Palio – a twice-yearly bareback horse race around the vast central Piazza del Campo – the university and the local football team, to name but a few. The system worked well for the bank's image and, by association, for the politicians who had an indirect role in running it.

But observers now question whether this hyper-local system of intertwined interests was the best way of managing what had, by 2007, become a major national bank. They say the institution was in effect controlled by the foundation, creating a lack of proper governance.

For much of the period in question, Draghi was head of the Bank of Italy. It was under his watch that irregularities were first noticed by the regulator, prompting inspections and, last spring, a management shakeup.

The Italian government has declared the bank solid and Viola is now looking for a new long-term investor, Italian or foreign, who "believes in our project". But analysts say full nationalisation – which the bank rejects as a possibility – may yet be on the cards. Whatever the future may bring for the bank, there is no doubt the "Sienese system", as it was known,is over. Many donations have been reduced and there is an appetite for political change. "Left or right, it doesn't matter," said Katiuscia Vaselli, a local journalist. "We just want someone who's capable who will act in the interests of the city."