LONDON (Reuters) - British Prime Minister Boris Johnson said on Friday his government will obey the law and remains confident the country can leave the European Union with a deal.

Johnson has vowed that Britain will leave the bloc on Oct. 31 with or without a divorce agreement, but parliament has passed a law to compel him to seek an extension if he has not got an agreement by Oct. 19.

He was asked on Friday if he was looking for ways to delay or get around the new law, which he has dubbed a “surrender act”.

“We will obey the law, but we’re confident we can come out on Oct. 31 and the best way to do that is to get a deal,” Johnson told reporters.

“That’s why the surrender act is so damaging,” he added. “It has had the effect with our European friends making them think: ‘maybe parliament can block this thing, maybe they will be forced to extend.’ If you’re in a negotiation that obviously makes it more difficult.”