LOS ANGELES — The heads of UCLA and the University of California system criticized a student-led pledge that urged candidates for student government to refuse trips to Israel sponsored by certain pro-Israel groups.

In a statement emailed Friday to students, staff and faculty, UCLA Chancellor Gene Block said the pledge was protected speech under the First Amendment, but added that “just because speech is constitutionally protected doesn’t mean that it is wise, fair or productive.”

“I am troubled that the pledge sought to delegitimize educational trips offered by some organizations but not others,” Block said, weighing in on a debate that has roiled the campus for months. “I am troubled that the pledge can reasonably be seen as trying to eliminate selected viewpoints from the discussion.”

Block’s statement was seconded by Janet Napolitano, the California system’s president, who said in a statement, “I share Chancellor Block’s concerns about students at UCLA who target any student seeking to participate in student government who has a relationship with, or wants to travel to, Israel on trips sponsored by certain groups.”

Issued by five pro-Palestinian student groups, the pledge urged the candidates to agree to refuse any trips to Israel sponsored by the Anti-Defamation League, the America Israel Public Affairs Committee and Hasbarah Fellowship, a joint venture between Aish International and the Israeli government. Two of the three major slates of candidates for student government signed the pledge, as did the student body president, but the Bruins United slate, which refused to sign the pledge, won a plurality on the council.

The issue of sponsored trips to Israel has been particularly controversial of late in connection with a February vote by the UCLA student council on a resolution urging the university to divest from certain corporations that do business in the West Bank. The resolution was voted down, 7-5, but the pro-Palestinian groups have charged that two of the council members violated the body’s conflict of interest rules by failing to abstain after having taken trips to Israel sponsored by the ADL and the American Jewish Committee. A student judicial body held a hearing last week on the case.