The president must decide between abandoning a campaign pledge and risking a rupture with the military.