BERLIN, Jan 3 (Reuters) - The German government believes that the euro zone would now be able to cope with a Greece exit if that proved to be necessary, Der Spiegel news magazine reported on Saturday, citing unnamed government sources. Both Chancellor Angela Merkel and Finance Minister Wolfgang Schaeuble believe the euro zone has implemented enough reforms since the height of the regional crisis in 2012 to make a potential Greece exit manageable, Der Spiegel reported. "The danger of contagion is limited because Portugal and Ireland are considered rehabilitated," the weekly news magazine quoted one government source saying. In addition, the European Stability Mechanism (ESM), the euro zone's bailout fund, is an "effective" rescue mechanism and was now available, another source added. Major banks would be protected by the banking union. The German government in Berlin could not be reached for comment. It is still unclear how a euro zone member country could leave the euro and still remain in the European Union, but Der Spiegel quoted a "high-ranking currency expert" as saying that "resourceful lawyers" would be able to clarify. According to the report, the German government considers a Greece exit almost unavoidable if the leftwing Syriza opposition party led by Alexis Tsipras wins an election set for Jan. 25. The Greek election was called after lawmakers failed to elect a president last month. It pits Prime Minister Antonis Samaras' conservative New Democracy party, which imposed unpopular budget cuts under Greece's bailout deal, against Tsipras' Syriza, who want to cancel austerity measures and a chunk of Greek debt. Opinion polls show Syriza is holding a lead over New Democracy, although its margin has narrowed to about three percentage points in the run-up to the vote. German Finance Minister Schaeuble has already warned Greece against straying from a path of economic reform, saying any new government would be held to the pledges made by the current Samaras government. (Reporting By Erik Kirschbaum; Editing by Raissa Kasolowsky)