An American soldier is waging war with the state of Arizona for custody of a baby boy that his estranged wife claimed died at birth — but actually sold to another couple, reports said.

And Sgt. Steven Garcia isn’t even the child’s biological dad.

Garcia, 24, a patrol supervisor in Seoul, South Korea, believed his wife was pregnant with his child when he left for the overseas assignment last May, Stars and Stripes reported.

In January, his sister told him his wife, Marina Garcia, had given birth in Sierra Vista, Arizona, but the baby died during childbirth, the outlet stated.

Steven was obviously devastated, but within a month he’d learn that the child was actually alive and well.

On Feb. 5, an Arizona highway patrolman pulled over a car with out-of-state plates for speeding, and inside was a Texas couple with a 3-day-old newborn baby.

That newborn turned out to be the baby Marina claimed had died — she’d sold it to the couple because she wanted nothing to do with it, prosecutors and a GoFundMe for Steven stated.

The couple, Alex Hernandez, 33, and his wife, Leslie Morin Hernandez, 41, were brought in for questioning and police discovered they weren’t the infant’s biological parents, the outlet reported.

Alex had fraudulently signed the birth certificate as the father after Marina arranged a deal with them.

The couple was taken into custody and the child, named Leo, was given to Arizona’s Department of Child Safety.

Marina was questioned by the police and she admitted to signing away her parental rights, court papers obtained by the outlet state.

“The only thing on her mind was getting rid of this child, this problem in her life,” Cochise County Attorney Brian McIntyre told KVOA.

Marina told police she had no idea who the dad was, and there was no way it could be her husband because he was stationed abroad — but when detectives called Steven, he told them the last time the couple had sex was right around the time of conception.

Steven was stunned.

“I was under the assumption the entire time that she was pregnant that I was the father,” Steven told KVOA.

DNA tests revealed otherwise.

“When I found out I wasn’t, I was pretty upset. I was kind of in denial. I couldn’t believe what was going on.”

He didn’t believe the cops — so he rushed home on emergency leave to sort out the situation.

His cousin told the outlet he was granted eight visits with Leo but was not given custody.

Marina and the Hernandez couple were each charged on Feb. 8 with kidnapping, fraudulent schemes, conspiracy and fraud by concealment, the outlet reported.

The couple pleaded guilty to some of the charges, others were dismissed, and they received four years of supervised probation.

Marina pleaded guilty to a felony count of an attempted fraudulent scheme for forging the birth certificate and is expected to be sentenced next month while her attorney contests a recommendation that she be sentenced to prison.

For now, Baby Leo is stuck in a legal limbo, living in foster care with no real parents.

Steven hopes to change that soon.

Even though he’s not the biological father and is planning to divorce Marina, he’s fighting the state of Arizona for custody and has started a GoFundMe to assist with his travel and legal expenses. His crusade is inspired by one thing: He was adopted and his adopted father “changed” his life.

“Without him, I would not be where I am today, and for the opportunity to do that for someone else, I believe it’s important. It could change the child’s life and give him a better future, and I believe that’s the right thing to do,” Steven said.