LONDON (Reuters) - British finance minister Philip Hammond said on Thursday a solution to the Brexit impasse could be found if lawmakers on all sides recognized they needed to compromise.

On Wednesday, Britain’s parliament rejected leaving the EU without a deal, further weakening Prime Minister Theresa May and paving the way for a vote that could delay Brexit until at least the end of June.

“We also have a duty to ensure that the country can move forward and that will mean that we have to compromise,” Hammond told BBC television.

“Nobody is going to get their perfect Brexit out of this. We have to have a Brexit that represents a compromise that reflects the fact that actually the nation was divided pretty much down the middle in the referendum in 2016.”