London — British lawmakers voted to delay Brexit on Thursday, just 15 days before the country is scheduled to leave the European Union. The House of Commons voted by 412-202 in favor of seeking to postpone the U.K.'s departure for at least three months beyond the current March 29 deadline.

The motion commits Prime Minister Theresa May's Conservative government to seek an extension until June 30 if Parliament approves a U.K.-EU withdrawal deal next week.

British lawmakers have already rejected May's EU divorce deal twice and if it fails a third time, the government says the U.K. is looking at a much longer delay to Brexit.

Get Breaking News Delivered to Your Inbox

Any extension to Brexit has to be approved by all 27 remaining EU countries.

Britain's Parliament was holding a series of votes Thursday on whether to delay the U.K.'s departure from the bloc. Earlier in the day, Parliament voted against holding a new Brexit referendum, at least for now, in a decisive 334-85 vote.

President Donald Trump said Thursday Britain's debate over leaving the European Union is "tearing the country apart." He commented on it as he welcomed Irish Prime Minister Leo Varadkar to the White House for an early St. Patrick's Day celebration.

Mr. Trump said he's "surprised at how badly" the Brexit negotiations have been handled. The president, who sees himself as a deal-maker, said he gave advice to British Prime Minister Theresa May but she didn't listen to him. He said both sides are very "cemented in" and he called it a "tough situation" and a "shame."