Fort Pierce, Florida - An ex-convict who posted anti-Islamic rants online pleaded no contest and was sentenced to 30 years in prison on Monday to setting fire to a mosque that the Orlando nightclub shooter attended occasionally.Joseph Schreiber, dressed in a burnt orange jumpsuit, his wrists and ankles shackled, pleaded no contest during Monday's hearing before Circuit Judge Steven Levin. Schreiber answered Levin's questions in a clear, unwavering voice before sentencing. He was also ordered to pay $10 000 in restitution although damages exceeded $100 000.A no contest plea is treated the same as a guilty plea. He had confessed to detectives that he set fire to the Islamic Center of Fort Pierce last September 11, the 15th anniversary of the 2001 terrorist attacks. The damage to the mosque was so extensive that the leaders recently announced that it will move.Omar Mateen was killed by police after opening fire at the Pulse nightclub on June 12 in a rampage that left 49 victims dead and 53 wounded, making it the worst mass shooting in modern US history. Mateen professed allegiance to the Islamic State group. His father is among roughly 100 people who regularly attend the mosque.Schreiber, who is Jewish, posted on Facebook last July that "All Islam is radical" and that all Muslims should be treated as terrorists and criminals.Prosecutor Steve Gosnell said Schreiber, 32, confessed to detectives that he set the fire, saying he believed Muslims "are trying to infiltrate our government" and that "the teaching of Islam should be completely, completely illegal".ApologySchreiber, however, in a written statement read to the court said that the fire was not caused by hate but by his anxiety. He feared that there could be another 9-11, Boston Marathon bombing or Pulse nightclub shooting, he said.He called on Muslim communities "to make peace with America, make peace with Israel and stop the attacks." He then turned toward the mosque's imam and apologised, who whispered "thank you" in return.Schreiber was previously sentenced twice to state prison for theft, according to records from the Florida Department of Corrections. The records show he served his first sentence from March 2008 to July 2009 and his second from June 2010 to August 2014.Last September, a former inmate who served time with Schreiber at the faith-based Lawtey Correctional Institution, described Schreiber as being a "couple cans short of a six-pack".Ralph Alfonso said Schreiber joined a Messianic Jewish group he led because he was looking for a place to fit in. Messianic Jews follow Jewish law and the Torah but also believe that Jesus Christ is the Messiah. He said Schreiber sometimes would say something negative about Muslims, but "we would tell him that's not what we believe, that it is not godly".A surveillance video from the mosque showed Schreiber driving up to the mosque on a motorcycle and approaching the building while talking on a cellphone. He carried a bottle of liquid and some papers and left when there was a flash. The first 911 calls were made about 45 minutes later, after the fire had spread to the attic. It took about four-and-a-half hours for firefighters to extinguish the blaze. No one was injured in the fire.