BERLIN (Reuters) -Volkswagen AG is in advanced discussions with Porsche Automobil Holding SE about a potential IPO of the luxury carmaker and the two have negotiated a framework agreement as the basis for preparing such a step, Volkswagen said on Tuesday.

The conclusion of an agreement must be approved by the management board and supervisory board, the carmaker said, adding a final decision had not yet been taken.

“Whether a Framework Agreement is concluded… is currently open and depends on the approval of both parties’ boards,” the statement said.

Porsche SE confirmed in a separate statement it was in discussion with Volkswagen about an IPO, a transaction which could include the acquisition of ordinary shares – which bestow voting rights upon the holder – of Porsche AG.

Volkswagen shares gained as much as 10% to 192.48 euros after losing 3.9% in early trade.

Speculation about a Porsche listing, which could be a record-breaking IPO, has lifted hopes on the stock market several times over the past year, but no decision has been made due to a complex stakeholder set-up.

Sources told Reuters last year the Porsche and Piech families, who control Porsche SE, were weighing taking a direct stake in Porsche AG.

(Reporting by Victoria Waldersee, Miranda MurrayEditing by Madeline Chambers)