Sportscar maker Porsche conceded a months-long power struggle to mass-market rival Volkswagen by axing its CEO and said it would raise at least 5 billion euros ($7.1 billion) in equity as the two prepared for a merger.

Porsche said Wendelin Wiedeking, Germany's best-paid executive and its CEO for the past 16 years, and finance chief Holger Haerter would quit the group immediately.

Before Wiedeking's departure, the Piech and Porsche families which control Porsche approved his proposal to raise fresh equity -- either in cash or through a contribution in kind -- and endorsed talks to sell a stake to Qatar.

This should lay the foundations for the creation of an integrated automobile group consisting of Porsche SE and Volkswagen, Porsche said.

The families had been at loggerheads for months over how to resolve Porsche's debt woes and the role VW would play. VW chairman Ferdinand Piech has pushed for VW to take over Porsche, on condition that Porsche fixes its finances first.

Porsche SE, the holding company that controls sportscar maker Porsche AG, needs to bolster its finances after accumulating more than 10 billion euros in debt through its botched attempt to seize control of VW.

What is good news is that decisions have at least been prepared. However, still a huge amount of questions (are) open which are decisive for valuation, said MM Warburg analyst Marc-Rene Tonn.

It remained unclear whether Qatar could take a stake in Porsche, in Volkswagen, or in both. It was also not clear what form a possible combination of the two companies could take.

On Tuesday, sources said that Qatar was primarily interested in an investment in Volkswagen, though a participation in the capital increase will also give it a stake than 25 percent in Porsche.

The issue was due to be discussed by Volkswagen's own board of directors at an extraordinary session on Thursday in Stuttgart, where Porsche's Zuffenhausen headquarters are based, rather than its own headquarters in Wolfsburg.

CONTRIBUTIONS IN KIND

Sources told Reuters that Porsche, as part of the capital increase hopes to raise 2 billion euros cash by selling a stake of less than 25 percent to Qatar, the first time a family outsider might gain voting rights in the company.

It was not clear whether the Porsche and Piech families, which trace their origins back to VW Beetle creator Ferdinand Porsche, would participate in the capital increase, but analysts said they believed the families could bring in the assets of their Salzburg-based Porsche Holding instead of cash.

An analyst who asked not to be named agreed: I cannot think of another asset the families have.

Porsche Holding holds the exclusive distribution rights for all Volkswagen group brands in Austria as well as central and eastern Europe. It had sales of 13.7 billion euros last year.

At 1139 GMT, Porsche shares were down 0.33 percent, while Volkswagen's were down 2.5 percent, compared with a 0.5 percent fall in the DJ Stoxx auto index and a flat German market.

Wiedeking, who opposed selling Porsche to Volkswagen, will be succeeded by Porsche's production head Michael Macht, the board said in a statement early on Thursday.

The duo's hasty exit will be sweetened by severance deals of 50 million euros and 12.5 million euros. Wiedeking, who had been criticized by German media for his fat pay check, said in a statement his after-tax payoff would be used for charity.

Porsche was forced to abandon attempts to win control over 75 percent of VW, leaving it with a stake of nearly 51 percent. The failed takeover attempt opened the door to VW chairman Piech, himself a part-owner of Porsche, to turn the tables on Porsche.

Porsche is entering the final stretch of negotiations with Volkswagen to create what both sides have called an integrated auto group, in which Porsche would essentially become the 10th brand in Volkswagen's sweeping automotive empire.

(Additional reporting by Edward Taylor, writing by Knut Engelmann, editing by Will Waterman and David Cowell)