The prime minister, who was in the German capital for ceremonies marking the 50th anniversary of the EU, said Britain wanted to settle the issue by diplomatic means.