BP's finance chief Brian Gilvary to retire in June

Nick Ansell | PA Images | Getty Images

British oil major BP said on Tuesday its finance chief Brian Gilvary will be retiring after eight years in the role, with the announcement coming just two weeks before Bernard Looney takes over as chief executive officer.

Murray Auchincloss, who is currently chief financial officer of BP's upstream division, will become BP's chief financial officer on July 1, the company said.

Gilvary, who oversaw BP's recovery following the 2010 deadly Gulf of Mexico spill which has cost the company more than $65 billion in fines and clean up costs, will step down from the board on June 30.

Looney, who will replace Bob Dudley as chief executive of BP in February, faces the tricky task of navigating the energy major through a rising tide of environmentalism and the move to a low-carbon economy.

"I have worked side-by-side with Murray for many years and have the utmost confidence in his ability to step into this critical role," Looney said in a statement.