MADRID – Spain’s government will effectively nationalize the nation’s fourth-largest bank to cushion the hurting banking sector and try to convince investors that the country doesn’t need a bailout like those taken by Greece, Ireland and Portugal, the Economy Ministry said Wednesday.

Under the deal, (EURO)4.5 billion ($5.9 billion) in funding that Bankia SA received from Spain in 2010 and 2011 will be converted into shares of the institution’s parent company, the ministry said in a prepared statement.

On Friday, the government is expected to announce a more wide-ranging banking system overhaul to free up frozen credit as Spain weathers a recession and 24.4 percent unemployment, the worst jobless rate among the 17 nations that use the euro.

Bankia faces the heaviest exposure among Spain’s banks to bad property loans caused by a construction boom that went bust, and holds (EURO)34 billion in problematic loans.

The government decision to assume control of the bank came after Bankia directors approved the plan and nervous investors sent Spanish government bond yields soaring and stocks plunging. They are concerned that Spain may be forced to ask for a bailout.

Spain will get 45 percent of Bankia under the deal and “will acquire control,” the ministry said.

The statement called the move “a necessary first step to ensure solvency, the tranquility of the depositors and to dispel the doubts of the markets on the capital needs of the entity.”

Hours before the announcement, Prime Minister Mariano Rajoy said Friday’s additional reforms “will help solve a lot of Spain’s problems.”

Spain’s goal is to give incentives for Spanish banks largely frozen out of international capital markets to again start giving credit to hurting businesses and consumers caught up in a bleak economy that is expected to contract 1.7 percent this year, Rajoy said.

“We know the situation is difficult, we know what we have to do and we will do it,” Rajoy said in Portugal.

The yield on the benchmark Spanish 10-year bonds rose Friday to 6.06 percent, a jump of 0.28 percentage points on the day and uncomfortably high. Bond yields indicate the rate the government borrows at when it taps financial markets. Rates of above 7 percent are seen as unsustainable, and forced Greece, Ireland and Portugal to ask for bailouts.

Beyond Spain’s banking problems, the market jitters were also due to a political crisis in Greece, where elections on Sunday were inconclusive. Political parties in Athens have so far been unable to form a governing coalition, meaning the country may have to hold new elections.