After pleading guilty to the fraternization charge, Corporal Cruz was reduced in rank from sergeant to corporal and restricted to the base. She may also leave the Marine Corps with an other-than-honorable discharge, meaning she could be stripped of almost all Veterans Affairs benefits and jeopardize future employment in the civilian sector.

Corporal Cruz’s lawyer, Capt. Jacob R. Johnston, said the commanding general of the Second Marine Division will decide if she receives an honorable discharge. Her separation from the Marine Corps is still being processed, said Maj. Robert E. Shuford, a spokesman for the Second Marine Expeditionary Force.

“Regardless of the outcome of this case, Corporal Cruz has been a courageous pioneer for women in the military and she has earned a place in Marine Corps history,” Captain Johnston said in a statement.

Of the roughly 184,000 active-duty Marines, around 15,800 are women. As of July, 24 women were serving in infantry billets in the Marine Corps, according to military documents obtained by The New York Times.

The Army, with roughly 740 women who are serving in previously restricted combat roles, has encountered its own issues with integrating women into the jobs. Last week, the Army Times reported an investigation of a relationship between a senior noncommissioned officer and a junior female infantry soldier in the same unit.

Corporal Cruz, of Fleischmanns, N.Y., joined the Marines as a supply clerk in 2013 and completed infantry training in 2014. Two years later, she requested to transfer to an infantry unit after then-Secretary of Defense Ash Carter ordered that women be allowed in all previously restricted combat roles. The Marine Corps vehemently opposed the change.

“I had a taste of what it was like to train to fight,” Corporal Cruz said. “And I felt like if I was going to say that I served my country, I wanted to be able to just do that — but not on the sidelines.”