Denmark's A.P. Moller-Maersk said Monday it had agreed to sell its oil and gas division, Maersk Oil, to French oil major Total SA for $7.45 billion.