A California man is in custody after unsuccessfully trying to light a gun owner and his home on fire Wednesday.

Maurilio Miranda, 48, is being charged with trespassing, attempted arson, and assault with a deadly weapon, Lt. Joe Gomez of the Fresno Police Department told the Fresno Bee. The charges stem from Miranda trying to burn down a house in the city. When the homeowner discovered Miranda pouring gasoline around the perimeter of the home, he confronted him with his semi-automatic handgun.

That's when Miranda threw gasoline at the homeowner and flicked a lighter. In response, the homeowner fired a shot into the ground. That didn't deter Miranda, the Fresno Bee reports. He then grabbed a board and threatened to hit the homeowner with it. The homeowner fired a second shot into the ground and threatened to shoot him which prompted Miranda to give up. Police then arrived on the scene and arrested Miranda.

The ordeal was not the first time that Miranda had attacked the home, police told the paper. In February, he had been arrested for breaking 20 windows on the home and causing thousands of dollars in damage. Police believe he tried to burn the house down in a separate incident a few days later. Lt. Gomez said Miranda "has a beef" with a previous resident of the home but not the family that currently lives there.

It's unclear why Miranda continues to attack the home but his previous attacks are what prompted the homeowner to buy a surveillance system and gun.