The suspect, Corey Johnson, is charged with one count of murder and two counts of attempted murder.
On Sunday Johnson was staying at the home of his friend 15-year-old Kyle Bancroft on Sunset Bay Lane.
Also in the house were Bancroft's mother Elaine Simon, his brother Dane Bancroft,13, and Dane's friend 13-year-old Jovanni Sierra.
Simon said she heard a commotion early Monday morning and when she went to investigate Johnson lunged at her with a knife, according to a police report. She said Dane ran to protect her and was also stabbed.
Johnson said he stabbed Sierra several times and cut his throat. He did not survive his injuries.
Police said Simon was stabbed 12 times and Dane was stabbed 32 times.
Johnson said Jovanni was "idealizing famous people and referencing them as gods" which went against his faith, according to the report. And he felt Dane "made fun of" his Muslim faith, the probable cause affidavit said.
"Corey Johnson has confessed his actions to our investigators stating that he stabbed the victims because of his religious beliefs," said interim Palm Beach Gardens Police Chief Clint Shannon.
"Our understanding is he had converted to Islam and had been watching violent videos online," Shannon said.
Johnson was a student at Dwyer High School and recently withdrawn, according to police.