Teen arsonist who torched his girlfriend's house tried to blame a 'random black guy' for his crimes
José Bernardo Rosas Madrigal (Polk County Sheriff's Office)

A teenage arsonist who set fire to his girlfriend's house tried to pin the blame on someone he identified as a "random black guy" when confronted by police.

The Daily Beast reports that 19-year-old Jose Bernardo Rosas Madrigal set fire to his girlfriend's house in Polk City, Florida, last month and then told police that a "random black guy" had set the fire instead.

Police quickly figured out he was lying, however, after seeing his phone's Google search history included a search for "how to burn a brick house down." Additionally, Madrigal had posted threatening messages to his girlfriend on Snapchat shortly before her house was set on fire.

The Polk County Sheriff’s Office says that they were also clued in because Madrigal drew the shape of a heart with lighter fluid on the fence that was located near his girlfriend's bedroom window.

He then lit the house's yard on fire, although the three family members who were in the house at the time quickly noticed the fire and extinguished it.

"We were very lucky," James Scott, the father of Madrigal's girlfriend, told the Daily Beast. "We caught it in time before it blew up."

Madrigal now faces three counts of attempted first-degree murder, along with one count of first-degree arson.