QUANTICO, Va. — A group of Marine second lieutenants, all men, stood before the ropes on an obstacle course. They looked exhausted, though the day was far from done. One by one, they took their shots at scaling the line. One by one, most of them dropped short of the top. They were already three hours behind the front-runners in their class.

Behind them, two more Marines, both women, prepared to start the course. One, a former enlisted Marine who was shivering in the 40-degree breeze, tried repeatedly to surmount the first bar, but failed. The second, a recent Naval Academy graduate, did better, meticulously, sometimes ingeniously, working her way through many of the obstacles.

But as she was determinedly attempting the ropes, a captain walked briskly up to deliver bad news: Neither woman had met a time limit. Silently, they shouldered their packs and trudged into the woods, their chances of becoming the first women to complete the Marine Corps’ demanding Infantry Officer Course summarily ended on its arduous first day on Thursday. (Twelve of the 108 men also were dropped that day.)

And that closed the latest chapter in the effort to integrate women into Marine Corps ground combat units, a sweeping change ordered by the former secretary of defense, Leon E. Panetta, in January when he lifted a 1994 ban on women serving in direct combat.