FORT PIERCE, Fla. (AP) — An ex-convict who posted anti-Islamic rants online confessed to setting fire to a mosque that the Orlando nightclub shooter occasionally attended, and said he was embarrassed by the crime, according to an arrest affidavit released Thursday.

St. Lucie County sheriff’s detectives wrote in the affidavit that after Joseph Michael Schreiber was arrested Wednesday, he told detectives that he had set the fire at the Islamic Center of Fort Pierce on Sunday, the 15th anniversary of the Sept. 11 terrorist attacks. The blaze also coincided with the Muslim holiday Eid al-Adha.

Schreiber, 32, told detectives he never intended to hurt anyone. No one was injured in the fire, which burned a 10-by-10-foot (3-by-3-meter) hole in the roof at the back of the mosque’s main building and blackened its eaves with soot.

Schreiber, who previously served two prison terms for theft, was developed as a suspect partly because of a tip from the public, the affidavit said.

He was arrested without incident Wednesday and charged with second-degree arson with a hate crime enhancement, a crime that carries a maximum 30-year sentence.

St. Lucie County Judge Philip Yacucci ordered Schreiber held without bail Thursday, calling him a danger to the community and a flight risk. He also noted that Schreiber had made anti-Islamic posts on social media. Last July, Schreiber posted on Facebook that “All Islam is radical” and that all Muslims should be treated as terrorists and criminals.

Schreiber, who is Jewish, stated that, “IF AMERICA truly wants peace and safety and pursuit of happiness they should consider all forms of ISLAM as radical. … ALL ISLAM IS RADICAL, and should be considered TERRORIST AND CRIMANALS (sic) and all hoo (sic) participate in such activity should be found guilty of WAR CRIM (sic) until law and order is restored in this beautiful free country.”

Wilfredo Amr Ruiz, a spokesman for the Council on American-Islamic Relations-Florida, said Schreiber “obviously doesn’t know about the efforts our community is engaged in with our cousins, the Jews, not only in Florida but throughout the nation.”

Omar Saleh, an attorney for CAIR, described both Schreiber and nightclub shooter Omar Mateen as “degenerates” and “punks.”

“Just like on June 12, when I was stressing that Mateen’s actions do not speak on behalf of Islam, I know that whatever religion Mr. Schreiber is, his actions do not speak on behalf of his religion,” Saleh said.

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 U.S. history. Mateen professed allegiance to the Islamic State group. His father is among roughly 100 people who regularly attend the mosque.

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. The public defender’s office had no immediate comment on Schreiber’s case.

A weekend surveillance video from the mosque showed a man on a motorcycle approaching the building while talking on a cellphone, according to the affidavit. 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.

The FBI and the federal Bureau of Alcohol, Tobacco, Firearms and Explosives joined the investigation into the fire.

Rabbi Bruce Benson, a chaplain with the Port St. Lucie Police Department, was outside Schreiber’s home Wednesday night. He said Schreiber attended his synagogue for about a month last spring to study the Torah, but left little impression, and gave no indication he might act violently in the future.

Benson said Schreiber’s father showed up at his office after his son was arrested, even though he wasn’t a member of his synagogue.

“I guess he didn’t know where else to go,” Benson said, adding that Schreiber’s parents are “shocked, just like any of us would be if it were our child.”

Benson said his reform synagogue, Temple Beth El Israel, has tried unsuccessfully in the past to reach out to the mosque.

“We would welcome the opportunity,” Benson said. “They’re a community feeling under attack. If we could all talk a bit, maybe things like this wouldn’t have to happen.”

Follow @CBSBaltimore on Twitter and like WJZ-TV | CBS Baltimore on Facebook

(© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)