In broadcast remarks at the start of the weekly cabinet meeting on Sunday, Mr. Netanyahu said, “Israel is not indifferent to the human tragedy of the refugees from Syria and Africa. We have already devotedly cared for approximately 1,000 wounded people from the fighting in Syria, and we have helped them to rehabilitate their lives.”

But he added, “We must control our borders, against both illegal migrants and terrorism.”

Other members of the opposition had joined Mr. Herzog’s call to take in refugees, including Zehava Galon, the leader of the left-wing Meretz party, and Elazar Stern, a legislator from the centrist Yesh Atid party. Mr. Stern invoked a gesture made by Menachem Begin, the former Likud Party leader, who, as prime minister in the late 1970s, welcomed several hundred Vietnamese boat people to Israel and granted them Israeli citizenship.

Ministers from Mr. Netanyahu’s conservative Likud Party and some coalition partners backed Mr. Netanyahu’s arguments against opening Israel’s gates to even a limited number of refugees, as did the leader of Yesh Atid, Yair Lapid.

Yisrael Katz, a Likud minister, suggested that Mr. Herzog should “at least” offer to host the refugees in his own home, following the example of the prime minister of Finland. “But in principle I think this is a strange, mistaken proposal,” he said of Mr. Herzog’s call. “Israel must not get involved in what is happening is Syria. We are not a European country. We are too close.”

Mr. Herzog replied to his critics with a post on Facebook on Sunday, writing, “You have forgotten what it is to be Jews. Refugees. Persecuted.” Calling again for Israel to take in a limited number of refugees who would be vetted, he added that Mr. Begin “must be turning in his grave.”

The African migrants and asylum seekers already in Israel are in a kind of legal limbo. Most are from Sudan and Eritrea, and are afforded blanket protection from deportation in line with international conventions. But Israel has granted only a very few of those who have applied official status as refugees, and their future remains uncertain.