The mom's instincts told her the man brandishing a gun near her children wasn't really a police officer.

But figuring out how to get help required real mom ingenuity.

As KTLA News reports, the family of six was on their way home from a water park on Sunday evening when they decided to stop for dinner. After purchasing food from a taco truck in City of Industry, California, the parents and their four children sat in the minivan and enjoyed their carne asada tacos and sodas.

That's when a stranger on a bike approached their car.

The man, later identified as Juan Rodriguez, told the family he was an undercover police officer. He flashed a gun and fake badge at the family and tried to frighten and intimidate them.

The mom was certain the man wasn't really a cop. Worried that he may hurt her family and aware that Rodriguez and his gun were only a few inches away from her toddler son, she came up with a plan to get him away from her husband and children. As the Los Angeles County Sheriff's Department (LACSD) wrote on Facebook:

She offered the man a street taco and told him she needed to grab napkins for him from the taco truck. The man with the gun continued to flash his gun and ransack through the mother’s purse as she walked away.

The mom headed straight for the taco truck, immediately warning the staff and customers not to look over at her van while she explained what was happening. She said that the man had threatened her family with a gun and asked that someone call 911.

Within minutes, deputies had arrived on the scene. When Rodriguez saw the patrol cars, he threw his gun into the family's van and tried to get in as well. However, authorities arrested him before anyone was harmed.

Rodriguez, who had several outstanding warrants, was charged with impersonating a peace officer and child endangerment. The LACSD commended the citizens who called for help as well as the mom who helped save her family:

“We want to give a shout out to the brave mother whose momma bear instincts kicked in and she was able to deescalate the situation, plan a distraction and found a way to get deputies to her location immediately.”