BAKU/LONDON (Reuters) - BP (>> BP) and Azerbaijan agreed on Thursday to extend into 2050 a contract to develop the ex-Soviet state's biggest oilfield cluster, a deal dubbed "the contract of the century" when first signed in 1994.

Under the new production sharing agreement, the Azeri state energy company SOCAR will increase its share to 25 percent from 11.65 percent, while BP's stake declines to 30.37 percent from 35.8 percent. BP will remain the operator.

The new contract secures large investment in Azerbaijan's oil sector for decades and a one-off bonus of $3.6 billion (£2.73 billion) for the government, a welcome boost to a nation that has struggled with a sharp drop in oil prices in the past three years.

"This bonus will be paid to Azerbaijan in eight tranches in the next eight years after an agreement is ratified by Azerbaijan's parliament," a source at SOCAR told Reuters.

The 1994 agreement to develop the giant Azeri-Chirag-Guneshli (ACG) fields in the Caspian Sea was transformative for Baku's political and economic development after the collapse of the Soviet Union.

The new deal, whose exact terms were not disclosed, remains profitable for its partners at current oil prices of $55 a barrel, BP Chief Executive Officer Bob Dudley said in an interview.

The fields produce 585,000 barrels per day, accounting for three quarters of the Azerbaijan's oil output, but production is expected to rise as the partners could invest up to $40 billion in the next 32 years, according to a statement.

"There are still billions of barrels to recover and billions of dollars to invest" in the project, said Wood Mackenzie analyst Laura Bennie.

"Attention will now turn to a brand-new production platform (Azeri Central East), which will be commissioned in the 2020s," she said.

Azeri President Ilham Aliyev said the remaining oil reserves of the ACG oilfields stood at 500 million tonnes.

Stakes of other firms in the consortium have also been reduced. Chevron (>> Chevron Corporation) now has 9.57 percent, Inpex (>> Inpex Corp) 9.31 percent, Statoil (>> Statoil) 7.27 percent, ExxonMobil (>> Exxon Mobil Corporation) 6.79 percent, TPAO 5.73 percent, Itochu (>> Itochu Corp) 3.65 percent and ONGC Videsh 2.31 percent.

(Additional reporting by Dmitry Zhdannikov and Karolin Schaps; Writing by Margarita Antidze; Editing by Christian Lowe and Edmund Blair)

By Nailia Bagirova and Ron Bousso