Angela Merkel warning as she urges UK to stay in EU
German Chancellor Angela Merkel has warned the UK that countries "at the bargaining table" negotiate better deals than those "outside the room".
Mrs Merkel said it was a decision for the British people, but she hoped the UK would vote to stay in the European Union in the referendum on 23 June.
She said the UK as "part and parcel" of the EU was of "benefit to all of us".
Leave campaigners said staying in might be in Germany's interest but that "does not mean it's in the UK's interest".
BBC political editor Laura Kuenssberg said the intervention was interesting because a few weeks ago German sources were saying privately that Mrs Merkel wasn't minded to say anything about the referendum.
Speaking during a news conference with Nato General Secretary Jens Stoltenberg in Berlin, Mrs Merkel said: "Obviously, it is up to the citizens of the UK themselves how they wish to vote on the upcoming referendum. I've said repeatedly before that I personally would hope and wish for the UK to stay part and parcel of the EU."
Analysis: BBC Berlin correspondent Jenny Hill
Angela Merkel has been reluctant to intervene in the referendum debate. She's made no secret of the fact that she wants Britain to stay in the EU; it's an important economic and political ally for Germany.
But she's understood to be concerned about how any comments might be interpreted by British voters. Which is why today's intervention is interesting. Mrs Merkel was relatively cautious. She was careful to emphasise that this is, after all, a British decision.
And then - in characteristically guarded language - a warning. The EU, she said, would never compromise with an outsider in the same way it would with a member state.
Mrs Merkel's comments may have been timed to coincide with those of other European leaders who've made it plain that they'd be in no hurry in the event of a Brexit to help the UK renegotiate rights and access. But her intervention certainly reflects a growing unease in Berlin that a Brexit has become a realistic possibility.
She said: "We work well together with the UK particularly when we talk about new rules for the EU.
"We have to develop those together with the UK and whenever we negotiate that, you can much better have an influence on the debate when you sit at the bargaining table and you can give input to those negotiations and the result will then invariably be better rather than being outside of the room."
She stressed the importance of the single market - a free trade area which also includes the free movement of goods, people and capital - and said countries outside the EU "will never get a really good result in negotiations".
The document has moved here.
"It would be not only be in our interest but it could also be in the interest of Britain when it can bring its whole political weight to the negotiating table as part and parcel of the EU."
Labour MP and Leave campaigner Kate Hoey told the BBC Mrs Merkel would be "well advised to stay out of what is a very, very important vote for British democracy".
"I really don't think that Angela Merkel telling the British people how they should vote in a democratic referendum in three weeks time will affect anyone's vote," she said.
"We can do extremely well outside the European Union - we don't need to be in the single market, other countries trade with the European Union and are not in the single market. We are the fifth largest economy, we can look outwards."
Mrs Merkel is the latest EU leader to speak out about the UK's referendum as the campaign enters its final weeks. On Wednesday, Dutch PM Mark Rutte warned of a tit-for-tat response if the UK were to implement a points-based immigration system while on Thursday, Spanish PM Mariano Rajoy warned that the consequences of an exit vote would be "very negative for British citizens".