(Reuters) - A woman was sentenced to life in prison on Tuesday after she pleaded no contest to charges she killed four people and injured some 40 others by plowing her car into a crowd at Oklahoma State University’s 2015 homecoming parade, court documents showed.

Adacia Avery Chambers is pictured in this booking photo provided by the Stillwater Police department, in Stillwater, Oklahoma, October 24, 2015. Stillwater Police department/Handout via Reuters

Adacia Chambers, 26, wiped away tears when she appeared in state district court in Stillwater. A judge told her that by pleading no contest she would waive her right to a trial and be convicted, Oklahoma TV station News 9 reported from the court room.

Chambers had been charged with four counts of second-degree murder. She had also been charged with 46 counts of assault and battery, but the number of charges was later reduced.

Under the terms of the plea deal, Chambers will serve four concurrent life sentences for the murder counts, and 39 additional 10-year terms to run concurrently for each assault charge, court documents showed.

Chambers was accused of driving her car around a police barricade and over spectators at the parade, killing three adults and a toddler.

According to court documents, she told Stillwater jail staff that she was suicidal at the time but not when she was booked a few hours later. Chambers’ attorney and relatives have said she has a history of mental illness.

She was declared competent to stand trial in December 2015.

Her father, Floyd Chambers, in a news conference after the hearing, apologized to the families of those killed and the people injured.

“My heart goes out to those victims,” he said.

“Any other parent that has children with mental health issues, we have got to get some help from the state with that,” he added.

He said his daughter gave him a message that the plea deal was what she wanted.