MP 'appalled that the country had to be taken to the brink'