Johnson was in support of Brexit during the 2016 membership referendum. The vote decided that the United Kingdom would leave the European Union. Theresa May became the new Prime Minister. She chose Johnson as Secretary of State for Foreign and Commonwealth Affairs in July 2016. Johnson left May's cabinet in July 2018 after her Brexit agreements failed.