In April 2017, Goldsmith was reselected as the Conservative Party candidate for Richmond Park prior to the upcoming snap general election to be held on 8 June. He regained the constituency as a Conservative candidate but winning with a majority of just 45 votes, the fifth-slimmest in the election. Less than 24 hours after the 2017 Barcelona attacks, he shared a controversial post on social media which compared ISIS's ideology to that of the left-wing British campaign group Momentum. In March 2019, he was one of 265 Tory MPs that backed a no-deal Brexit being left on the table.