A pregnant San Antonio teenager was just two weeks away from her due date when she was killed by her stepfather — who was also the father of the unborn child — police say.

Armando Garcia-Ramires shot himself in the mouth shortly before his arrest. (Bexar County Jail)

The fetus, whose heart was still beating when officers found the body of 15-year-old Jennifer Delgado, died a short time later at a hospital, the San Antonio Express-News reports.

Armando Garcia-Ramires, 36, a Mexican citizen in the country illegally, has been charged with two counts of capital murder.

Police said he and Delgado — with whom he had fathered another child — lived together for a time after he and the girl's mother separated.

Delgado recently returned to her mother's apartment and told her that Garcia-Ramires was the father of both her 1-year-old and her unborn child. Police were not notified at that time, the Express-News reports.

Garcia-Ramires set up a meeting with his ex-wife on March 6 to pay her some money. But after failing to show up, he called her and threatened to harm himself.

The woman found Garcia-Ramires at a creek near her apartment, where he said he "could not live without her" and shot himself in the mouth, according to police. Authorities found him there, still holding his handgun and pulling the trigger, and took him to a hospital.

Police went to the ex-wife's apartment next. They found Delgado dead — shot once in the chest and at least four times in the head — and her 1-year-old sitting next to her, according to police documents.

Garcia-Ramires was charged after police matched muddy bootprints outside the apartment to him. He remains in the Bexar County Jail.

He has been arrested twice by Immigration and Customs Enforcement agents, in 2011 and 2016, but allowed to remain in the United States both times.