Angela Merkel has warned Britain will face a "price" if it restricts EU immigration post-Brexit.
The German chancellor added that her suggestion "isn't malicious" but an "obstacle" would be created to compensate the remaining 27 EU member states if such a policy emerged.
Prime Minister Theresa May has outlined Britain's desire to regain full control of the number of people coming to the country from the EU, with free movement of people no longer expected to apply.
But Ms Merkel, speaking at an event with trade union officials in Berlin, said "if the British Government says that free movement of people is no longer valid, that will have its price in relations with Britain".
She added: "This isn't malicious, but I can't have all the good sides and then say there's a cap of 100,000 or 200,000 EU citizens, more aren't allowed into Britain - perhaps researchers as well, but no others, please.
"That won't work, and then we would have to think about what obstacle we create from the European side to compensate for that."
In light of the EU referendum result being 52% in favour of Brexit and 48% against, Ms Merkel said: "We will, of course, always think in the future relationship of the 48 or 49% who didn't back Brexit."
The divorce process will be "very, very complicated", Ms Merkel added.
Her remarks came after Michel Barnier said Brexit talks will start hours after the General Election, adding he is not aiming for "no deal or a bad deal".
The EU's chief Brexit negotiator also dismissed suggestions the UK will be required to pay up to 100 billion euro (£85 billion) as an "exit bill".
Mr Barnier said the UK's financial liabilities will be dependent on the date of Brexit and the methodology adopted, adding the European Council will "work with the Brits, very calmly" to reach an agreement.
He said he has never quoted the figure of 100 billion euro.
Mr Barnier told the European Parliament: "The figures will depend on the methodology that we have to agree on. It'll also depend on the actual date of the UK's exit.
"It's not (me) who is going to set a figure. The European Council has said we're going to work together with the Brits, very calmly, to find an agreement on commitments undertaken.
"I'm going to do it perfectly calmly. It's not about revenge, it's not about punishment, I'm simply going to look at the figures and facts and the commitments that have been undertaken - no more, no less."
He also said on Brexit: "Our aim is to achieve an agreement. I certainly don't intend to have no agreement, no deal or a bad deal. We want to conclude a deal with the UK, not against the UK."
Former Ukip leader Nigel Farage earlier warned Britain could walk away from talks by the end of the year as a result of European Commission president Jean-Claude Juncker's "bloody rude" behaviour and attempt to "bully the Brits".
The MEP said: "Either we get some grown-up, reasonable demands from the European Union or the United Kingdom will be forced to walk away before the end of this year.
"We can't spend two years with this farce."