A complex tug of war between two German auto makers makes a sharp U-turn as Porsche AG’s supervisory board reportedly fires CEO Wendelin Wiedeking, 56, Thursday, following a failed power struggle with Volkswagen AG.

Porsche’s Chief Financial Offer Holger Haerter also has resigned.

Wiedeking reportedly accepted a €50 million ($71 million) compensation package for his contract, which expires in 2012. His removal now clears the way for the sale of Porsche to Volkswagen.

Porsche in a statement says it is planning a capital increase of €5 billion ($7 billion) to prepare for joining Volkswagen.

The two sides have been engaged in high-profile negotiations for months, in which Porsche’s Wiedeking sought to create a combined auto group by buying a controlling stake in rival VW.

However, he was forced to back off the takeover attempt after Porsche fell €10 billion ($14 million) in debt. Wiedeking next sought a merger with Volkswagen but ran into repeated clashes with Volkswagen Chairman Ferdinand Piech over terms of such a deal, Reuters reports.

The VW chairman is the grandson of Ferdinand Porsche, founder of Porsche and designer of the Volkswagen Beetle. He also is the cousin of Porsche Chairman Wolfgang Porsche. Piech was named VW’s CEO in 1993 and chairman in 2002. He now seeks to make Porsche the 10th brand in VW’s stable.

Under Wiedeking’s leadership, Porsche sped from near bankruptcy in 1992 to one of the world’s most profitable auto makers. While his departure paves the way for a merger with VW, analysts say the process likely will drag out for some time.

In a statement today, Volkswagen’s supervisory board says it is endorsing the creation of an integrated automotive group with Porsche under the leadership of Volkswagen and that it will meet with Porsche’s newly name CEO Michael Macht “to jointly draw up a final concept to achieve this goal.”

The board says a comprehensive auditing and assessment process will be initiated as the prerequisite for signing an agreement on the principles relating to the combination of the two companies.

“The integrated automotive group will be formed from the progressive participation of Volkswagen in Porsche AG and the subsequent merger of Porsche Automobil Holding SE and Volkswagen AG,” the statement says.

“Porsche will remain an independent company headquartered in Stuttgart. In the opinion of all parties, this basic concept represents the best possible solution for pooling the strengths of both companies as envisaged.”

The details of a final joint concept will be worked out over the coming weeks, Volkswagen says in a later joint statement.

“Representatives of the Porsche and Piech families, the State of Lower Saxony and the workforce of both companies have however already expressed their great satisfaction with the foundations that have now been laid.”

Wolfgang Porsche is quoted in the statement as saying the resolution to merge the two auto makers represents “a landmark decision and a milestone achievement for the future. Porsche will preserve the myth and identity of the Porsche brand in the integrated group. That brings new prospects for growth.”

Market reaction to the proposed integration of the auto makers has been swift, with J.P. Morgan publishing a 17-page report suggesting protracted negotiations may be on the horizon before a deal is closed.

Porsche’s debt structure is a major consideration, writes J.P. Morgan analyst Ranjit Unnithan. “A resolution of this issue is “a necessary condition before VW is prepared to buy Porsche’s manufacturing assets,” he says.

“However, (the auto maker’s capital increase) would allow the problem to be postponed for a year, since only €3.3 billion ($4.3 billion) of the recently renewed €10 billion credit line (fully drawn) is due in March/April 2010.” The remainder is due in 2011.

By then, Unnithan says, Porsche may be enjoying a “boost” from this year’s launch of the Panamera 4-seater and new iterations of the 911 2-seater and Cayenne SUV.