BERLIN — The trans-Atlantic debate over digital privacy rights versus the surveillance needs of intelligence agencies was put under a spotlight on Monday, as President Obama called for continued access by law enforcement officials to thwart terrorism, while some European privacy advocates urged greater restraint.

“I want to say this to young people who value their privacy and spend a lot of time on their phones: The threat of terrorism is real,” Mr. Obama said, speaking at a trade show in Hanover, Germany.

“I’ve worked to reform our surveillance programs to ensure that they’re consistent with the rule of law and upholding our values, like privacy — and, by the way, we include the privacy of people outside of the United States,” he added.