The U.K. government paid private sector consultants hundreds of thousands of pounds to help design a Brexit customs arrangement — only for the EU to dismiss it almost as soon as it landed in Brussels.

Government records show the U.K. tax authority, Her Majesty’s Revenue and Customs (HMRC), spent £680,000 on a contract with consultancy firm McKinsey & Company to, among other things, assess the “commercial feasibility” of the “new customs partnership model.” That is one of two customs proposals put forward by U.K. Brexit negotiators in talks aimed at avoiding a hard border between Ireland and Northern Ireland.

The contract, which was awarded, on the same day the government secured European Council backing for a transition deal that unlocked the current round of Brexit talks on Ireland and the future relationship. According to a listing on the government’s Contracts Finder online database, under the heading “New Customs Partnership,” McKinsey was taken on to provide an “assessment of import initiated supply chain and commercial feasibility” of the idea, which would involve the U.K. continuing to manage tariffs on imports destined for the EU despite having left the bloc’s customs union, while also enforcing its own independent tariff regime.

In response to a written parliamentary question from Labour’s Shadow Brexit Minister Jenny Chapman, Financial Secretary to the Treasury Mel Stride confirmed the government had secured McKinsey’s services to “model future customs arrangements.”

Brexit negotiations have stalled in recent weeks after EU negotiators effectively ruled out both of the U.K.’s proposals for managing customs without introducing a hard border between Northern Ireland and the Republic once the U.K. leaves the bloc.

Prime Minister Theresa May has also faced intense domestic criticism for her customs plans, with MPs forcing a vote in the House of Commons that will call on the government to change strategy and pursue “an effective customs union” with the European Union after Brexit, something May has repeatedly ruled out. The vote is nonbinding, but it could flush out Conservative supporters of a closer customs relationship ahead of an expected crunch vote on the matter, which is expected when the Trade Bill returns to the House of Commons.

At the same time, Brexiteers in May’s party have also criticized her “customs partnership” plan — known in Whitehall as the “hybrid model.” Leading Euroskeptic Jacob Rees-Mogg described it as “completely cretinous” and a “betrayal of common sense.”

Even Brexit Secretary David Davis has shown limited enthusiasm for the proposal, telling an audience of American business people as far back as September that it was a “blue sky idea.”

However, when asked last month by MPs on the House of Commons European scrutiny committee which of the U.K.’s two customs proposals he preferred, Davis said: “What is the point of paying consultants to do this work and to make the decision in advance?”

Chapman, whose party has called for a customs union with the EU, accused the government of “wasting time and money” on alternative customs models by “outsourcing the problem to a private consultancy.” Chapman said the government should publish the outcomes of McKinsey’s work so MPs could “scrutinize the feasibility” of the government’s customs plan.

A spokesperson for the Treasury, which oversees HMRC, said the government wanted to “harness expertise from both the private and public sector” to “ensure trade with the EU is as frictionless as possible.”

It is not the first Brexit-related work McKinsey has done for the government. The firm was also paid a reported £1.9 million for a six-month contract with the Department for Exiting the European Union, which ran from April to October last year.

McKinsey declined to comment.

UK government paid consultants £680K for Brexit customs plan.