JERUSALEM — In a head-spinning turnaround, Prime Minister Benjamin Netanyahu of Israel announced on Monday that he had reached an extraordinary deal with the United Nations refugee agency to resettle thousands of African asylum seekers in Western countries. Within hours Mr. Netanyahu suspended the deal after coming under heavy criticism from his coalition partners.

The flip-flop appeared to reflect Mr. Netanyahu’s fear of losing support from those partners or from his right-wing constituency, who call the asylum seekers infiltrators and want them gone. His opponents on the left described the prime minister’s behavior as an embarrassing and cowardly surrender under pressure.

Mr. Netanyahu, who is battling for his political future under the cloud of multiple corruption scandals and faces possible charges of bribery, had apparently failed to consult with most of his own conservative Likud Party colleagues or coalition allies before announcing the migrant deal.

If the deal with the United Nations refugee agency bought Israel some international good will, diverting attention from Friday’s flare-up along the border with Gaza when Israeli forces killed at least 15 Palestinians and wounded many more, the effect was short-lived.