The infant's mother was charged with attempted second-degree murder. (WENY)

At first, Karen Seals thought the sounds coming from her neighbor’s garbage bag were from an animal trapped inside. Wary, she and her sister grabbed a stick and went to investigate.

“My sister came out off the porch and went to the side to the back yard of my neighbor’s house with a stick, thinking it was a dog,” Seals told WENY, an Elmira, N.Y., ABC and CBS affiliate. “We thought it was a dog, honey, and it wasn’t. It was a baby!”

“I ran up and I see the little legs are dangling out the bag, so I said, ‘You guys, it’s a baby,’ and they’re looking at me like ‘It’s a baby?’ I said, ‘Yeah it’s a baby.’ So I ran up, I picked her up, I tore the bag that she was in.”

She said the baby had been pushed headfirst into the bottom of the trash bag, which had been tied and placed near the house.

The baby girl wasn’t responsive. The sisters rushed her into their house.

“She wasn’t breathing, so I opened her mouth … and I drop some water in there and she started gasping for air after I did that,” Seals told the news station.

“I just spoke to her: ‘Come on baby, come on baby, come on sweetness.’ ”

Authorities summoned to the scene on Tuesday began to care for the baby and launched a search for whoever had placed her in the trash. Investigators told reporters the baby had likely been in the trash bag for hours.

Shortly after the baby was found, Elmira Police announced they had charged the infant’s mother, 17-year-old Harriette M. Hoyt, of Sayre, Pa., with attempted second-degree murder. Sayre is about 20 miles from Elmira, just over the Pennsylvania-New York border.

An arraignment had been scheduled, and Hoyt was being held in the Chemung County jail, according to police. It was unclear if she had hired an attorney.

Her baby survived and was taken to a hospital to be treated.

She was listed in stable condition, although she had been transported to a second hospital for further evaluation. Child protective services and the Chemung County District Attorney’s Office are involved in the case. Police are asking anyone with information on the crime to come forward.

No one keeps nationwide statistics for abandoned babies, although all states have some kind of safe-haven law for parents who don’t believe they can properly take care of a newborn.

According to The Washington Post’s Ben Guarino, in 1999, Texas governor George W. Bush signed the first safe-haven bill into law after 13 dead infants were found in trash bins in Houston.

In Texas, about 50 infants had been surrendered under the safe-haven law between 2004 and 2011, according to the Dallas Morning News. In that seven-year period, more than 1,600 children died of abuse or neglect, and more than 2,300 children of all ages were abandoned, the newspaper reported, citing state statistics.

New York’s safe-haven law allows a parent to leave an unharmed newborn “with an appropriate person, or in a suitable location” if the child is not more than 30 days old.

On Tuesday, Seals told the news station that the baby she found in the trash didn’t deserve what happened.

“All I wanted to do is cry for her,” she said. “I could just feel her heart, and what that little girl went through is wrong.”

On Monday night, she made a public post on Facebook: “Why would anyone do evil like that to a baby I hope she ok and just pray for her we all did right by her lil mama we love u”

Read more:

She suffocated a 10-year-old in a sweltering box. A jury says she should die, too.

Fallout from Charlie Gard case: protests, death threats and ‘disgraceful tide of hostilities’

Four years after 13-year-old Dylan Redwine disappeared, his father is charged with murder

Elizabeth Thomas’s abduction made her a different child. Her family isn’t sure how to help her.

A teenage girl was ‘brainwashed’ before she was abducted by her teacher, her father says