BRUSSELS (AP) -- Britain may not have two years to negotiate its divorce from the European Union after all.

The EU's chief negotiator on Brexit warned Tuesday that the country will have less than 18 months once talks begin and that it won't be allowed to pick and choose what parts of the EU it wants to keep.

The British government, meanwhile, agreed for the first time to publish details of its plans for Brexit before formal talks start - though how much detail it would disclose remained an open question.

While steering away from specifics on what a Brexit deal might look like, EU negotiator Michel Barnier, who took up his post months ago after Britain voted in June to leave the EU, said formal procedures at the start and end of the talks will cut into the time Britain has to leave.

"Time will be short," he said. "All in all there will be less than 18 months to negotiate."

British Prime Minister Theresa May wants to invoke Article 50 of the EU's key treaty, which will officially kick off two years of exit talks, by the end of March.

But Barnier, who has visited 18 of the EU's 28 member states to gauge views on Britain's withdrawal, warned that the effective negotiating time will be less due to procedures such as parliamentary approvals to rubber-stamp any deal.

If May sticks to her timetable, Barnier said an agreement may have to be secured by October 2018 to get a final agreement in place by March 2019 - two years on from the triggering of Article 50.

British Foreign Secretary Boris Johnson appeared unconcerned by such a deadline.

"That timeframe seems to me to be absolutely ample," he said on arriving for a meeting of NATO foreign ministers in Brussels.

It's a fluid situation, not least because a British court ruled last month that Parliament needs to give its approval before the government can trigger Article 50.

The government is contesting that ruling in the Supreme Court. Should it confirm Parliament's involvement, May's plans could be delayed.

It's also possible that European governments might extend the two-year period outlined within Article 50.

The British government has been reluctant to reveal much about what sort of post-Brexit relationship it is looking for out of fear that it would weaken its hand in negotiations. That has fueled allegations from opponents that May and her ministers lack a coherent Brexit strategy.

Opposition Labour Party lawmakers forced a Wednesday debate in Britain's House of Commons, calling for the government to offer some clarity by publishing its plan for leaving the EU before it triggers Article 50.

Fearing defeat at the hands of the opposition and rebellious pro-EU Conservatives, the government agreed late Tuesday.

But it still said it would not "be showing our negotiating hand until we have to," leaving doubts about how much detail the plan would include.

Barnier sought to dampen talk that Britain could "cherry-pick" what it likes about the EU, noting that the single market and its four freedoms, such as the freedom of movement, are "indivisible."

"This will be the atmosphere in which we will be conducting our negotiations with the U.K. and the sooner the better," he said. "We are ready; keep calm and negotiate."

During the referendum campaign, many of those in favor of leaving the EU had indicated that Britain could "have its cake and eat it" - continue to trade freely in the EU single market while clamping down on the free movement of people from the region.

German Chancellor Angela Merkel said that sort of deal is off limits.

"The internal market threatens to be weakened by negotiations on Brexit," Merkel told a congress of her conservative Christian Democratic Union in Essen. "We will not allow cherry-picking. The four fundamental freedoms must be preserved."

Given that it takes many years to conclude wide-ranging free trade deals - Canada recently completed one with the EU after seven years - there's been speculation that Britain and the EU might forge a transitional arrangement that would see Britain pay into the EU budget in return for access to the single market. Bank of England Governor Mark Carney says some sort of transitional period would be advantageous as it would allow firms to adjust.

Barnier indicated there may be "some point and usefulness" to a transitional arrangement.

"It is for the British to say what kind of relationship they want and for the 27 EU states to define the future they want to build with them," he said. "You can't do everything in 15 to 18 months of negotiations."

The British government's opaque approach has frustrated many in Europe.

Jeroen Dijsselbloem, the Dutch finance minister who chairs meetings of the 19 EU countries that use the euro, said proposals he's seen so far "are incompatible with smooth and incompatible with orderly."

---

Geir Moulson in Berlin, Lorne Cook in Brussels and Jill Lawless in London contributed to this report.