* Berlin to inject up to 4 bln eur to save WestLB - sources
* Berlin may get up to 49 percent stake in return - sources
* Deal fulfils EU and bank regulatory conditions - sources
* Berlin wants no role in running bank operations - sources
* Deal must be legally finalised by mid-December - sources
* WestLB's savings bank owners had balked at more support
(Adds details of deal from sources close to talks, background)
By Gernot Heller and Jonathan Gould
BERLIN/FRANKFURT, Nov 24 (Reuters) - Germany moved to rescue stricken lender WestLB on Tuesday by agreeing to pump in up to 4 billion euros ($6 billion) that could leave Berlin with a 49 percent stake in the restructured bank.
Sources familiar with the last-minute talks said the federal government, which has already taken a 25 percent stake in the country's No. 2 lender Commerzbank and nationalised property financier Hypo Real Real Estate this year, did not plan to run the public-sector lender.
A basic agreement had been reached between the federal government and WestLB's owners to hive off the lender's problem assets into a "bad bank", but the deal was not yet legally binding, the sources said.
If the deal goes through by mid-December as planned, it would meet the bank's capital requirements and gain approval from the European Union, one of the sources said.
"This is a rescue operation, without which ... the bank would have run into regulatory difficulties," one source said.
WestLB's problems had added to financial market jitters about the robustness of banks, weighing on the euro and pushing five-year credit default swaps on the bank out by 60 basis points to about 150 points.
Duesseldorf-based WestLB, owned by the state of North Rhine-Westphalia and local savings banks, is seeking to offload around 85 billion euros in risky assets to a "bad bank" and create a healthy core bank focused on corporate customers.
Financial guarantees the bank needed to forge ahead with its plan were due to run out at the end of the month, and some of its savings bank owners had said they were not prepared to keep throwing money at the bank, which has soaked up a series of rescues since the financial crisis erupted two years ago.
The sources familiar with Tuesday's deal told Reuters that the 4 billion euros that Berlin is prepared to put into WestLB would initially take the form of a "silent participation" that could be converted into WestLB shares.
WestLB's current owners would be responsible for potential losses of up to 17.5 billion euros at the bad bank.
MERGER RAMIFICATIONS
The deal could portend a wider shake-up of the banking landscape in Europe's largest economy, with the European Union demanding ownership changes at WestLB that could pave the way to a merger with its public-sector landesbank peers.
Germany's savings bank association DSGV said the country's landesbanks -- public-sector wholesale banks -- had agreed to give financial backing to WestLB's restructuring plan.
Analysts said market fears that the bank could go under were overblown.
"It's a significant bank, so it will have to be saved," said Merck Finck analyst Konrad Becker. "The question is who will pay for it this time."
Many landesbanks expanded into higher-margin but risky investment banking activities after the European Commission imposed a ban on state guarantees in 2005, crimping their ability to lend to firms at razor-thin margins.
Like WestLB, Germany's No. 1 and No. 2 landesbanks, LBBW and BayernLB, as well as smaller ship financier HSH Nordbank, have been hit by billions of euros of writedowns in the financial crisis, forcing their owners to inject rescue funds to prop them up.
Since February 2008, WestLB has received 11 billion euros in guarantees from Soffin and the bank's owners to finance its sweeping restructuring programme. (Additional reporting by Philipp Halstrick, Alexander Huebner, Edward Taylor and Patricia Uhlig in Frankfurt and by Sarah Marsh and Dave Graham in Berlin, editing by Will Waterman) ($1=.6708 Euro) ((michael.shields@thomsonreuters.com, Reuters Messaging: michael.shields.reuters.com@reuters.net; +49 69 7565 1266))