TALLAHASSEE (CBSMiami/NSF) – The Florida Legislature appears to have solved the riddle of juvenile sentencing on its fourth try.

After struggling since 2010 to resolve the issue, the Senate on Wednesday unanimously passed a bill (HB 7035) that would change juvenile-sentencing laws in cases of murder and other serious crimes.

READ MORE: 82-Year-Old Former Cuban Political Prisoner Ana Rodriguez Fighting To Keep Her Miami Home

The measure was approved by the House early this month, though it will have to return to the House for another vote because of changes made by the Senate.

“I can truly say that we have come a long way, baby,” Sen. Arthenia Joyner, D-Tampa, said on the Senate floor. “It has not been easy.”

The bill stems from a pair of major U.S. Supreme Court decisions dealing with life sentences for juveniles.

The rulings have spawned legal questions in Florida courts, and Senate sponsor Rob Bradley, R-Fleming Island, has maintained that lawmakers needed to pass a bill this year or the Florida Supreme Court would end up deciding the sentencing issues.

“It’s our duty as a legislature to provide courts with this guidance, and today we’ve fulfilled that duty,” Bradley said Wednesday.

In a 2010 case, known as Graham v. Florida, the U.S. Supreme Court banned life sentences without a “meaningful opportunity” for release for juveniles convicted of non-homicide crimes. And in a 2012 ruling known as Miller v. Alabama, the high court barred mandatory life sentences for juveniles convicted of murder. Juveniles can still face life sentences in such cases, but judges must weigh criteria such as the offenders’ maturity and the nature of the crimes before imposing that sentence.

An underpinning of the U.S. Supreme Court rulings was that juveniles are different from adults and function at different stages of brain development. As a result, the court held, juvenile sentencing guidelines must offer young offenders the chance to show that they have been rehabilitated while in prison.

The legislation calls for judicial hearings and sentencing standards that would vary depending on the nature of the crimes.

For instance, a juvenile convicted of a murder classified as a capital felony could be sentenced to life in prison after a hearing to determine whether such a sentence is appropriate. If a judge finds that a life sentence is not appropriate, the juvenile would be sentenced to at least 35 years. Also, juveniles convicted in such cases would be entitled to reviews after 25 years.

Last year’s version of the measure, also sponsored by Bradley, died when he withdrew it over a debate on the length of the sentences. He has held out for longer sentences in the past.

READ MORE: Zoo Miami's New Director Wants To Take It To The Next Level, Bring Conservation Awareness To All County Parks

The compromise measure was brokered by Bradley, Joyner, Sen. Oscar Braynon, D-Miami Gardens, and House sponsor. James Grant, R-Tampa.

In part, the amendment clarifies that the only youths ineligible for reviews of their sentences are those who commit violent felonies and then first-degree murders.

“Because the bill provides sentencing reviews for virtually all kids tried as adults, it recognizes that kids are different from adults,” said David Utter, the policy and legislative director for the Southern Policy Law Center. “That’s a really important step for Florida to acknowledge.”

Braynon said after the vote that many offenders affected by the measure are gang members.

“A lot of times, they don’t have a family, and they end up in these gangs,” he said. “And while they did something wrong and they deserve to get the punishment, we’ve got to understand that there was something that led to that.”

But Bradley said after the vote that the bill doesn’t allow the most dangerous offenders to be released.

“This bill gives a judge, prosecutors and the police the tools they need to keep us safe,” he said. “If someone is truly a danger to society, they will not see the light of day.”

Joyner said she doesn’t believe the bill goes far enough to protect juveniles from harsh sentences, but that it’s a necessary first step. She said she would have preferred that all juveniles be eligible for a review of their sentences regardless of their crimes.

She also noted that the bill doesn’t apply to offenders who were sentenced as juveniles and who remain behind bars.

“This is not over, because we still have that group of kids who are between the ruling of the court and this law,” Joyner said. “There’s no retroactivity in our law, and so there will be more litigation.”

MORE NEWS: Coral Gables High School Football Head Coach Roger Pollard Reported Missing

This report is by Margie Menzel with The News Service of Florida.