‘It’s a source of great shame that my time in Parliament ended in this way,’ former MP William Wragg said.