(Adds details of restructuring deal, market reaction, context)
RIO DE JANEIRO/BRASILIA, Dec 13 (Reuters) - Brazilian telecommunications firm Oi SA has reached a deal with two major creditor groups on a plan to recover the company from bankruptcy protection, in a major breakthrough for Latin America's largest ever in-court debt restructuring.
The company said in a filing on Wednesday that the Ad Hoc Group of Oi Creditors and International Bondholder Committee had agreed in principle on a new restructuring plan that would effectively let creditors take over the company.
Common shares of Oi plunged as much 21 percent in Wednesday trading on the proposed dilution in a debt-for-equity swap that would give bondholders up to 75 percent of the company's shares.
It was the stock's biggest daily drop since June 2016, when Brazil's biggest telecom by network size filed for protection from creditors on 65 billion reais ($20 billion) of bonds, bank debt and other obligations.
The price of Oi's 5.75 percent bonds due in 2022 jumped 11 percent to $45.10 on Wednesday.
The two major private bondholder groups, which hold about 22 billion reais of debt, declined to comment. Bondholders who stand to win big from the deal include distressed debt titan Aurelius Capital Management and Goldentree Asset Management.
The bondholders' support could open the door to formal approval of the new restructuring plan at a Dec. 19 creditor meeting, lifting a cloud from a company that employs more than 100,000 Brazilians and serves 40 million wireless subscribers.
A government official, who was involved in negotiations but asked not to be named due to the sensitive nature of the talks, said the new restructuring plan was the best proposal yet in terms of improving Oi's cash flow.
Oi owes billions of dollars in fines to the government, payment of which will be restructured over the next 20 years under the latest proposal.
Telecoms regulator Anatel has threatened to intervene in the company if shareholders and creditors could not come to terms.
Another government source who has followed the negotiations said the federal solicitor general's office had brokered the deal reached late on Tuesday.
A prior plan submitted by Oi with approval of its board limited a debt-for-equity swap to 25 percent of the carrier's capital, generating stiff resistance from bondholders and leaving insiders pessimistic about reaching a deal this year.
($1 = 3.30 reais) (Reporting by Gram Slattery in Rio de Janeiro and Leonardo Goy in Brasilia; Editing by Brad Haynes, Chizu Nomiyama and David Gregorio)