Alpha Bank and Eurobank, hit by heavy losses, said Monday they will merge to form Greece's largest lender, backed by fresh cash to restore faith in the debt-hit country's cash-starved banking system. Trying to stay afloat as the economy shrinks, Greek banks are heavily exposed to their own government's bonds and Alpha Bank accordingly took a charge of 539 million euros to post a first half net loss of 525 million euros. Eurobank, which failed a European bank stress test this year, had a loss of 588 million euros, highlighting the need for the new entity's 3.9-billion euro ($5.7-billion) capital increase which will be led by a Qatari fund. "The boards of directors of Alpha Bank and Eurobank EFP announce that they have reached agreement on a combination of Alpha Bank and Eurobank EFG," the banks said in a joint statement. "We are announcing a marriage today, it creates the biggest bank in Greece," said Alpha Bank chairman Yannis Costopoulos, who will head Alpha Eurobank. Greek stocks soared nearly 15 percent on the day, led by the banking sector as investors welcomed a rare bit of good news after Athens had to seek a second international debt bailout in July. Trading of Alpha Bank and Eurobank shares was temporarily suspended. After a 5-for-7 share swap, Alpha Bank shareholders will hold 57.5 percent of the new lender and Eurobank shareholders 42.5 percent. The capital increase will be undertaken by the three major shareholders involved -- the two Greek families in each bank and Qatar's Paramount Services Holding Ltd, which will end up controlling 17 percent of the new lender. "This is the first major investment in Greece for years and a vote of confidence for the country. We believe it will bring more," said Costopoulos. Finance Minister Evangelos Venizelos hailed the merger as a "positive development which attests to the dynamism and perspectives of the Greek banking system. "It is also important that Qatar participates and invests in Greece, sending a message abroad of confidence" in the troubled eurozone member's economy, the minister said in a statement. The deteriorating state of Greek public finances has cast a pall on the country's banking sector which has significant exposure to state debt which as their results showed Monday, can cost them dear. Eurobank CEO Nicholas Nanopoulos noted that over 50 billion euros in deposits has left Greece in the past year. Greek banks have seen their market valuation nearly halve since the start of 2011, helping send the Athens stock exchange to a 15-year low. Lenders have suffered as a result of debt-hit Greece's pariah status among creditors and have had to rely on the European Central Bank for fresh loans to keep them afloat. Greek banks reportedly stand to lose some five billion euros as a result of a government bond rollover that is part of Greece's second, 159-billion-euro EU-International Monetary Fund bailout agreed last month. The new lender's top capital ratio of 14 percent would be double the 7.0 percent that banks are required to achieve under the new Basel III international banking regulations. The Bank of Greece currently demands a minimum 10 percent capital ratio. The merger "will offer great confidence and security to the deposit holders of these banks, in addition to greater liquidity which our economy needs," analyst Haris Zamanis told Mega television. Costopoulos, long a proponent of consolidation, called the merger a "big step to rationalise the Greek banking system." Analysts said the deal could spark others. "This is a first move towards a slightly stronger sector," said Alex Koagne, a Natixis banking expert on Greece. "It will enable the launch of a banking consolidation in Greece."