The UK’s prime minister has secured an extension of the Brexit deadline until October 31 and is seeking a compromise exit plan with the opposition.