Shares of Magna International Inc surged 21 percent on Thursday, after it said it inked an agreement with founder Frank Stronach to eliminate the auto parts maker's dual class structure.

The company also said it swung to a profit in the latest quarter, beating estimates on the back of a pickup in global vehicle production rates and cost cuts, which allowed it to reinstate its quarterly dividend.

Shares of Magna were up C$13.43 at C$77.70 on the Toronto Stock Exchange on Thursday morning.

The Aurora, Ontario-based company said the agreement with its colorful founder, if approved in court and by shareholders, would see the elimination of Magna's Class B Shares -- through which Stronach controls the company.

The Stronach Trust, which has about 66 percent of Magna's voting rights through 726,829 outstanding Class B shares it indirectly owns, would indirectly get 9 million newly issued Class A Shares, or about 7.5 percent of Magna, and $300 million in cash.

Based on Magna's closing price of $62.53 Wednesday on the New York Stock Exchange, the deal would be valued at $863 million.

Each Class B share currently carries 300 votes. The new structure would mean one share, one vote.

Our proposed new share structure will unlock value for all shareholders, Vincent Galifi, chief financial officer at Magna, said in a call with analysts.

Galifi said the deal, which could be completed by the end of Magna's second quarter, should enhance the liquidity and marketability of shares as the simplified capital structure would be more consistent with its key competitors.

The deal also includes the establishment of a joint venture with the Stronach Trust to make electric and hybrid vehicles, with Stronach at the helm.

(Stronach) feels Magna is part of his blood, said Don Walker, Magna's co-chief executive. On a go-forward basis, he is a very big believer in the future of electric vehicles.

Magna would invest $220 million for a 73 percent interest in the joint venture. The Stronach group would invest $80 million for the rest of the stake but would have effective control with the right to appoint three of five board members.

QUARTERLY PROFIT TOPS ESTIMATES

Magna said it earned $223 million, or $1.97 a share, in the first quarter ended March 31. That compares with a loss of $200 million, or $1.79 a share, a year earlier.

Excluding a gain of 12 cents a share on the sale of an electronics systems facility in China, it earned $1.85 a share, comfortably ahead of analyst expectations of 80 cents, according to Thomson Reuters I/B/E/S.

Revenue was up 54 percent at $5.51 billion, compared with estimates of $5.14 billion.

Magna reinstated its quarterly dividend at $0.18 per share.

The company said the recovery in the North American auto industry was continuing, thanks to improved sales over the past few months, combined with low levels of dealer inventories.

North American light vehicle production rose 67 percent in the quarter, while in Western Europe production rose 33 percent.

The company said complete vehicle assembly sales rose 11 percent in the quarter to $446 million.

($1=$1.03 Canadian)

(Reporting by John McCrank in Toronto and Savio D'Souza in Bangalore; editing by Rob Wilson)