The former chief prosecutor of the International Criminal Court, on a visit to Israel, urged the Palestinians to proceed with caution as they consider pursuing war crimes charges against Israel. He said it would be preferable for the two sides to work out their differences directly.

Luis Moreno-Ocampo said the Palestinians should not rush ahead with a case against Israel, saying they could expose themselves to the same accusations.

The Palestinians were accepted as a nonmember state in the UN General Assembly in 2012, an upgraded status that allows them to qualify for membership in dozens of international conventions and agencies.

Most worrisome for Israel is the Palestinian threat to join the International Criminal Court and pressing war crimes charges against Israel. The Palestinians allege that Israeli crimes range from actions carried out by its military to construction of Jewish settlements on occupied land captured in the 1967 Mideast war.

When he was the court’s chief prosecutor, Moreno-Ocampo turned down a request by the Palestinians to join the court. But as a nonmember state, they are now eligible, he said. If they accepted its jurisdiction, however, the Palestinians could also be investigated for Hamas rocket attacks and suicide bombings against Israeli civilians.

“The obstacle they had in the past is gone, it is removed,” he told the Associated Press. “The best would be if Israelis and Palestinians create a common approach to prevent future activities.”

Moreno-Ocampo, currently a professor at Yale University, is visiting the Hebrew University in Jerusalem to speak before students in its Transitional Justice program.

He refused to speculate whether war crimes have been committed by either side. Regardless, he recommended the sides avoid the court and find a “creative” way to resolve their differences.

“Everyone feels they are victims,” he said. “If you don’t want to be at the ICC, do something before — don’t wait.”