In Iraq he followed through on a campaign pledge to end the US military occupation, only to restart a version of it – gradually escalating to more than 5,000 troops and daily airstrikes – after the Islamic State overran northern Iraq in 2014.