Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A young woman in Alaska has been charged with killing two of her baby daughters — in incidents nearly two years apart — after police say they discovered evidence that she searched the internet for instructions on how to get away with murder.

Police said 23-year-old Stephany E. LaFountain, of Fairbanks, searched the internet for instructions on how to commit at least one of the homicides.

A 9-month investigation by the Fairbanks Police Department revealed that LaFountain used search terms such as "ways to suffocate," "How to: Commit the Perfect Murder," and "16 steps to kill someone and not get caught," detectives alleged.

This undated photo released by the Fairbanks Police Department shows Stephany Lafountain. Fairbanks Police Department via AP

NBC News was not able to reach an attorney for LaFountain. The suspect, who is not believed to have given birth to any other children, officials said, was booked Thursday afternoon. She appeared in court via a video link Friday, when bail was set at $2 million. She did not enter a plea.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Her next court date was scheduled for Sept. 5.

"We have two infants, we have two babies, that were killed by their mother," Fairbanks police Chief Eric Jewkes told reporters Thursday. "How do we make this right?"

The investigation began on Nov. 24, 2017, when first responders were called to a residence on the U.S. Army's Fort Wainright base for a medical emergency. A 13-month-old girl identified by police only as "J.L." was found not breathing, and the baby was flown to a hospital, where she was pronounced dead, police said in a statement.

Fairbanks detectives took the case from U.S. Army Criminal Investigation Command because the child and her mother were not in the military, according to the statement. The inquiry went quiet until this week when LaFountain was indicted on multiple allegations of first and second degree murder.

Included in the allegations is the suspected Sept. 15, 2015, murder of LaFountain's 4-month-old, who also died after a breathing emergency.

LaFountain's husband, who was not identified, was on an out-of-town deployment during the second death, but he returned home immediately, officials said. Fairbanks police spokeswoman Yumi McColloch said detectives believe the man had no prior knowledge of the alleged crime; she said he was being treated as a victim in the case.

"We have a family of a baby that has suffered in obscurity, in silence," Chief Jewkes said.

McColloch said it's not clear if the forensic investigation into LaFountain's computer searches included the period surrounding the 2015 death. The department's statement said the search terms it alleges she used relate to the hour before she called for help with the 13-month-old's breathing.

Both babies, investigators said, were otherwise healthy and police haven't revealed their thoughts on a possible motive.

"This is just an unimaginable tragedy," the chief said.