Contests in those states have pitted allies against each other in a fierce competition for the president's endorsement.