German Chancellor Angela Merkel has told politicians she stands by her 2013 complaint that "spying among friends" is unacceptable as she appeared before a committee examining alleged US surveillance in Germany.
The parliamentary panel is also examining questionable activities by German intelligence - which Mrs Merkel said she heard about only much later.
The committee is investigating alleged eavesdropping in Germany by the US National Security Agency (NSA) and its relationship with German counterparts.
The inquiry was launched a year after former NSA contractor Edward Snowden revealed details of secret US eavesdropping programmes in 2013.
Mrs Merkel is expected to be the last witness.
Reports later in 2013 that the NSA listened in on German government phones, including Mrs Merkel's, prompted a diplomatic spat between Berlin and Washington that soured otherwise good relations with the Obama administration.
Mrs Merkel declared at the time that "spying among friends" was unacceptable.
But subsequent reports indicated that Germany's own BND intelligence agency may have helped the US spy on European companies and officials.
Mrs Merkel said that she first heard about the BND's alleged activities in March 2015, sticking to a line set out by other officials.
And she said she stood by her comment from 2013.
"My standard was that spying among friends is not acceptable, and if it happens we have to intervene," she told politicians.
She noted that a law governing the BND has since been revised, and that the agency's chief was replaced. The BND is overseen by the chancellery.
Mrs Merkel also defended Germany's failure to achieve a mutual "no-spy" agreement with the US, something that her government held out the prospect of in summer 2013, shortly before a national election.
In several hours of testimony, she rejected left-leaning politicians' suggestions that the government promised something it should have known was not on offer.
On the German side, Mrs Merkel said, "I am convinced that there was very intensive work on it", though she did not personally get involved, but those efforts eventually came to nothing.
Mrs Merkel stressed the importance and difficulty of "finding the right balance between freedom and security".
She said that the possible loss of data from her mobile phone, which was owned by her party, was "absolutely manageable" if the alleged spying happened.
German federal prosecutors investigated but closed the probe in 2015 because they could not find evidence that would stand up in court.
Over the years, the NSA affair has failed to inflict any significant political damage on the chancellor.
Mrs Merkel said she sees intelligence co-operation continuing under the new US administration, and it is important to her that "no doubts arise" about that.