As part of the deal with CNPC, on 15 October 2005, according to the "Law of the Republic of Kazakhstan On Subsoil Use", CNPC agreed to sell back 33% of the shares of PetroKazakhstan Inc. to KazMunaiGas (KMG), a transaction which was completed on 5 July 2006. Further on 6 July 2007 KMG bought back a 50% share in PetroKazakhstan subsidiary PetroKazakhstan Oil Products LLP [PKOP) thereby allowing the Kazakh government to regain an equal share of the nation's most modern oil refinery.