MAKTAB KHALID, Iraq — Around 6 each morning, with the sun already a threat, an officer at a security checkpoint here in northern Iraq rolls back the concertina wire just enough to allow travelers to pass one at a time.

Over the course of each day, thousands will move through this opening, one of only a few official routes across the 650-mile border that now separates two lands: Iraqi Kurdistan and the territory under the control of the extremist militants of the Islamic State.

Much of the traffic is one-way: men, women, entire families — their faces drawn with stress and uncertainty, dragging overstuffed bags and seeking refuge among the Kurds.

But many others move back and forth between the two regions, crossing from one side to the other in the morning to go to work or run errands, then returning at the end of the day. Residents on the Islamic State side might cross to the nearby city of Kirkuk to buy supplies, see a doctor or take a university exam, while some from the Kurdish side might head the other way to visit relatives.