A Texas woman was sentenced to 45 years in prison for beating her 2-year-old daughter to death because the child was crying.

Emma Rodriguez, 27, had faced life in prison without parole. She pleaded guilty in exchange for a reduced sentence, according to reports.

The sentencing was held Thursday in San Antonio.

“I was frustrated at the time,” Rodriguez told Judge Kevin O’Connell, according to KSAT-TV. “She kept crying.”

San Antonio police found Beautiful Rodriquez unconscious in her crib in 2015, according to the station.

Rodriguez admitted to violently slapping her daughter and then tossing her into a crib, causing her death, the station reported.

She was pregnant at the time and caring for seven children, including Beautiful.

Beautiful was killed right after she and her siblings were returned to Rodriguez’s custody, the station reported.

She sought their return after the kids were placed in foster care by the Texas agency that investigates reports of abuse and neglect of children, according to the station.

“There is forever a hole in our hearts that can never filled,” the station quoted Beautiful’s foster mother as saying at the sentencing. “Life for is will never be quite as beautiful as it was when the sweet, innocent little girl was in it.”

Rodriquez's defense attorney asked the judge for a more lenient sentence of 20-years in prison.

“It’s a tragedy for everybody,” attorney Edward Bartolomie said, according to the San Antonio Express-News. “She came from an extremely abused background; (Child Protective Services) has been involved in her life since she was 2; she used drugs.”

Bartolomie told the paper that Rodriquez gave birth to her eighth child in jail and relinquished her rights to all the children, all of whom have since been placed in homes.