Elizabeth Morin, 23, was sentenced Thursday to spend three months in jail for causing the death of her 3-year-old son by leaving an unsecured handgun in their home.

The district attorney's office in Anchorage said in a statement that during the sentencing hearing, Superior Court Judge Jack Smith recognized Morin had taken rehabilitative steps since her son's death, but the fact that she left a loaded firearm out for several days was careless to the point of criminality.

Morin faced up to four years for the charge of criminal negligent homicide, prosecutors said.

Anchorage police responded to the mother's emergency call on Aug. 5, 2015, when she reported her son had been hurt, prosecutors said.

"The investigation revealed that Morin had left an unsecured, loaded .38 caliber revolver in the area where her 3-year-old son lived and played for several days at their South Anchorage residence," prosecutors said.

Police reported at that time the boy died of a self-inflicted gunshot.

Court records show Morin was charged in January 2016 and pleaded guilty in August of that year.