Sean Holstege, and Corina Vanek

We are used to reading how the story ends badly when a parent leaves a child in a hot car.

In a state with long, hot summers, we've grown accustomed to hearing about a parent going to jail and children going into protective custody or the morgue.

But the story of Shanesha Taylor was never normal, even if the outcome was more typical than most people think.

"It's different," Maricopa County Attorney Bill Montgomery said Friday, the day his office announced a plea agreement

that will let Taylor stay out of prison, rebuild her life and give her a very real chance of keeping her kids.

ROBERTS:Prosecutors get it right for Shanesha Taylor

How different things must have seemed to Taylor when she was arrested in March. Police said she left her two children in her Dodge Durango for 45 minutes while she interviewed for a job at a Farmers Insurance office in Scottsdale. Taylor told police she was jobless, without child care that day and had occasionally been homeless.

But the Phoenix mother's case took a different turn when her tearful mugshot spawned worldwide support.

News of Taylor's arrest and her emotional booking photo sparked a national discussion about poverty and access to public assistance.

Her children were examined at a hospital the day of her arrest and released unharmed. They are now with family and under the supervision of the Division of Children, Youth and Families.

Taylor was charged with two counts of felony child abuse and faced up to eight years in prison, plus up to four more years of probation.

Instead, the composed 35-year-old went to Maricopa County Superior Court to attend a settlement conference Friday. The deal means her case will be dismissed if she successfully completes a diversion program.

"This is a beautiful resolution to a very long, very hard journey," Taylor said Friday morning after entering into the agreement.

Taylor's attorney, Benjamin Taylor, no relation, later thanked Montgomery and Judge Joseph Welty.

"She says she wishes she could redo that day," he added, noting that his client, a U.S. Air Force veteran, would have gotten the job at Farmers.

Shanesha Taylor is now scheduled for a civil court hearing to regain custody of her kids, who were 6 months old and 2 years old at the time of her arrest. Her attorney is confident she will prevail.

"She's been able to prove to Arizona she's a loving mother who made a mistake," he said. "This could have ruined her life."

Taylor will be required to complete parenting and substance-abuse classes and to establish education and child-care trusts for each of her three children. Each education trust must have at least $10,000 in it.

Since her arrest, a fundraising Web page set up on her behalf at youcaring.com has raised more than $114,775 from 4,052 donors to assist with her legal fees and other expenses.

"This provides a future for my kids," she said.

"The trust fund is tremendous," Benjamin Taylor said. "This will help her get back on her feet."

Montgomery said that given the circumstances of the case — with Shanesha Taylor seeking employment and experiencing difficulties with child care — the resolution seemed appropriate. He routinely prosecutes people who leave their kids unattended to go shopping or partying.

"Where we can focus on an opportunity for rehabilitation without having to use punitive consequences, we're always willing to take a look at that," Montgomery said. "And our resolution today shouldn't be taken as a policy shift. This is just how we were able to resolve this one particular case."

A Republic review of about 10 cases over the past 30 years where children left in hot cars were unharmed shows that this kind of resolution is not uncommon.

Over the years, parents who left children in cars have been offered probation, saw charges dropped or were able to plead to lesser charges. Roughly 31 children have died in hot cars since 1990, according to numbers from kidsandcars.org and The Republic.

"Based on all the facts and circumstances in this matter, we believe this agreement represents a just resolution that appropriately holds the defendant accountable for her actions while also recognizing the best interests of her family," Montgomery said in a statement.

Benjamin Taylor summed it up this way: "This says that justice can have mercy."

Republic reporter Megan Finnerty contributed to this article.