Earnest initially faced the death penalty but under a plea agreement accepted by San Diego Superior Court Judge Peter Deddeh, he avoided the execution, according to CNN.
Earlier in September, Earnest pleaded guilty to a 113-count hate crime, admitting that he set an Escondido mosque ablaze and opened fire in a Poway synagogue "because he wanted to kill Muslims and Jews," the Justice Department said back then, adding that "there is no place in American society for this type of hate-fueled violence."
Earnest, who was 19 at the time of the incident, opened fire inside the synagogue during a religious service, killing one person and injuring three others and was then chased by members of the congregation. He fled the scene of the shootings in his car but was later captured by law enforcement officers who discovered the AR-15 automatic rifle and magazines of ammunition in his car.
An open anti-Semitic letter was posted online several hours before the attack by Earnest in which he pointed out that he had started preparations for the attack shortly after the Christchurch mosque shooting in New Zealand.