Paolo Gentiloni, Italy’s new prime minister, announced in the early hours of Friday that his cabinet had agreed to the rescue and would be dipping into a €20bn fund that had already been approved by the parliament earlier this week in the event that MPS needed to be saved.

The government announced that its first step would be to strengthen the bank’s ability to procure liquidity. If necessary, the bank can move ahead with a sale of state-backed bonds.

Pier Carlo Padoan, the finance minister, did not specify how much the rescue would cost the Italian state, but he said funds would be sufficient to cover the bank’s capital requirements.

Italy’s new prime minister, Paolo Gentiloni, made the announcement in the early hours of Friday. Photograph: Andreas Solaro/AFP/Getty Images

“This will secure MPS’s capital needs and allow the bank to continue its industrial plan. Italy’s third largest bank will finally return with force to operate in support of the Italian economy and in a contest of full tranquillity for its savers and its employees,” Padoan said.

The government said junior bondholders – who under new EU rules must take a hit before any state intervention – would be able to convert their bonds into shares, which will then be converted into senior debt.

The announcement brought to an end months of uncertainty about MPS’s fate after the bank embarked on an attempt to first raise billions of euros on the private market. In a statement on Thursday night, MPS said that the attempt “has not ended with success”.

“In particular, there were no manifestations of interest on the part of an anchor investor who could have put a significant investment in the bank and this negatively affected decisions of institutional investors,” MPS said.

MPS’s board met on Thursday night after it failed to secure an anchor investor, thought to be the Qatar sovereign wealth fund.

Within hours of that announcement, Gentiloni convened his cabinet and formally approved the state rescue plan.

The bank also announced that the two investment banks that tried unsuccessfully to arrange the private investment – JP Morgan and Mediobanca – would not receive any fees for their work.

Shares in the bank were volatile during the day, lifting off record lows but then falling back in the confusion surrounding the next steps. The shares – down 85% this year – slumped by 7.5%. MPS is under instruction from the European Central Bank to bolster its finances after it was found to be the weakest of 51 European banks subjected to stress tests.

The failure to convince Qatar to inject up to €1bn means that Italy will have to impose losses on bondholders before it can stump up cash because of new EU rules intended to prevent taxpayers from picking up the bill for bank losses. However, about €2bn of the bonds are held by private investors, and the government suggested that arrangements were in place to protect those junior bondholders.

The bailout is not just a financial issue. It is also expected to have political consequences for Italy’s controlling Democratic party and Matteo Renzi, the former prime minister who stepped down from office earlier this month after he was roundly defeated in the referendum on 4 December. While Gentiloni has taken over as interim prime minister, Renzi is expected to run for election again as early as next year.

Wolfango Piccoli, an analyst with Teneo Intelligence, said a government rescue might not be immediately damaging politically, in large part because public attention will be diverted from the issue during the Christmas period. But the issue could become “politically toxic” later, once it becomes clear how many of the bank’s junior bondholders are eventually compensated for their losses, and how long it takes for them to be paid.

“In terms of the junior bondholders, let’s see what happens. it will eventually be decided by Brussels,” Piccoli said. Once MPS is saved, a number of other banks could also require government support.

“This will drag on for some time. If we have elections in May or June, it will be used then [against Renzi’s Democratic party], and there is no way to deflect that,” he added.

Monte dei Paschi di Siena: a brief guide to the world's oldest bank

Read more

The bail-in of bondholders should help reduce the amount of funds the Italian government must contribute to MPS.

Analysts at Barclays said any state intervention for MPS may not be enough to solve the problem facing the banking system, which has amassed bad lending at a time when the economy has been stagnating. They said the six largest banks could need €30bn to clean up their balance sheets and even if the €20bn “were to represent sufficient firepower to plug the hole, we doubt the decision to deal with MPS through a public sector solution will represent a template to be unrolled across the system quickly”.

The €5bn fundraising from private investors was complex, involving a cash call on shareholders, asking bondholders to swap their investments for equity, and also parcelling off bad debts. The €4.25bn Atlante fund – set up by Renzi and backed by larger banks to prop up banks – had been expected to hoover up the problem loans.