Denbury Resources , a US independent oil and gas company , said on Sunday it had agreed to buy fellow independent Encore Acquisition in a transaction valued at $ 4.5bn , including the value of the minority interest in Encore Energy Partners .