U.S. President Donald Trump on Wednesday wrapped up participation in the annual NATO summit, facing an alliance that had largely bent to his will.