A man accused of setting a string of fires in Long Beach, including two in homes in which the residents slept, pleaded no contest today and was immediately sentenced to more than 30 years in prison, the District Attorney’s Office announced.

The most disturbing aspect of the case was that in two of the arsons, simultaneously occuring April 16, 2011, people were inside sleeping when the fires were started. In one case, a victim’s bed was set afire while the victim slept, authorities said. No injuries were reported. As the fires continued throughout the week, he would leave messages scrawled on walls for police as his desire to be directly connected to the crimes increased.

Following his arrest after a series of fires and burglaries by the Long Beach Police Department in April of last year, Joshua Ethan Thomas, 27, of Long Beach pleaded to five counts: one count of arson of an inhabited dwelling, two counts each of attempted murder, and arson of a structure or forest; Thomas additionally admitted a 2004 prior strike conviction for criminal threats out of Los Angeles County. He was charged with a total of 18 fires.

Long Beach Superior Court Judge Charles Sheldon immediately sentenced Thomas to 33 years and eight months in state prison in a case prosecuted by Deputy District Attorney Sean Carney from the Target Crimes Division.