 In June 2008, McCain reversed his longstanding objection to offshore drilling.Stating that he had changed his views because of high gas prices and dependence on imports, he endorsed legislation that would give each coastal state the power to determine whether to allow offshore drilling.In May 2017, McCain joined two other Republicans in voting with Democrats against the repeal of Obama's regulations on drilling in public lands.