A 22-year-old man called in a bogus warning about a mass shooting at a fair in the Los Angeles area — so he could avoid going there with his parents, police said.

Erik Villasenor sent an email to the Los Angeles County Fair association that “someone was planning on doing a mass shooting Sunday at the fairgrounds,” and he just wanted to “inform you guys,” the Pomona Police Department said Saturday.

“It was with the intent that it would spark some chaos and commotion, it would be captured in the news media,” Pomona Police Chief Michael Olivieri told reporters. “And then he could use it as an excuse to his parents not to go to the fair.”

“Kind of a crazy thing,” Olivieri added. “But that’s what we have learned.”

When confronted by authorities, Villasenor allegedly admitted that the email was a hoax.

Villasenor, who lives with his parents, is being held at the Pomona City Jail on $20,000 bail, records show.

The Los Angeles County Fair is a month-long festival in Pomona that draws thousands of visitors each year.

According to the Los Angeles Times, organizers recently spent $200,000 to beef up security at the fairgrounds in the wake of recent mass shootings, including one in July at the Gilroy Garlic Festival, where a gunman killed three people and injured several others.