Can a battlemaster use Maneuvering Attack to prevent two creatures from opportunity attacking one ally?

Maneuvering Attack. When you hit a creature with a weapon attack, you can expend one superiority die to maneuver one of your comrades into a more advantageous position. You add the superiority die to the attack’s damage roll, and you choose a friendly creature who can see or hear you. That creature can use its reaction to move up to half its speed without provoking opportunity attacks from the target of your attack.

If an ally is within two enemies’ reaches, and the battlemaster has extra attack, hits and uses the maneuver on both enemies, and if the ally only uses the movement reaction when the second creature is hit, would that ally still take opportunity attacks from the first one?