BERLIN — The German government has protested to the Iranian ambassador following the conviction of an Iranian agent for spying on targets including a former German lawmaker who headed a German-Israeli friendship group.

The Pakistani man was convicted in Berlin last year of espionage and sentenced to more than four years in prison. His targets included Reinhold Robbe, who headed the German-Israeli Association.

Iranian ambassador Ali Majedi was summoned to the Foreign Ministry just before Christmas. After German media reported on the meeting, the ministry said Tuesday he was told that “spying on people and institutions with a particular relationship to the state of Israel on German soil is a blatant violation of German law.”

The ambassador was told that such activities would not be tolerated.