London: Britain's Justice Secretary David Gauke says he will quit if Boris Johnson becomes prime minister, in an early sign of some of the headwinds the likely new leader will face.

Gauke, who has served in Prime Minister Theresa May's cabinet since she took office in June 2016, said he would not be able to serve under the former foreign secretary if he pursues a no-deal Brexit.

Protesters fly a blimp of likely prime minister Boris Johnson over Parliament Square during a rally for a fresh Brexit referendum. Credit:PA

As the Tory leadership contest enters its final 48 hours, the prominent no-deal critic told the Sunday Times that crashing out of the European Union would lead to national "humiliation".

"Given that I've been in the cabinet since Theresa May came to power, I think the appropriate thing is for me to resign to her," Gauke said.