The confrontation, which was captured on video by at least one bystander, occurred Monday afternoon in front of a home. The crowd of demonstrators was marching in the street at the time.
Jacob Bracken, 39, was charged with two counts of assault with a deadly weapon, police said.
He allegedly took the firearm out of the cab of a pickup truck and pointed it at the protesters. Upland police officers responded to the scene and the Rancho Cucamonga resident was arrested within minutes, officials said.
LAPD officers take a knee to show solidarity with protesters
No protesters were arrested in connection with the incident, police said. No injuries were reported.
The demonstration, comprised mostly of high school students and young adults, began peacefully about 3 p.m. near the intersection of Euclid Avenue and Foothill Boulevard.
According to investigators, tensions began to rise when a group with opposing views began bantering with the marchers from across the street. The protesters then crossed the street and made their way toward the counter-protesters.
After Bracken allegedly brandished the firearm and was arrested, the officers escorted him out of his house through a rear door, keeping him out of sight in order to avoid another melee, authorities said.
Officers began giving dispersal orders at 6 p.m., when a local curfew went into effect. Most of the crowd departed the scene, but between 50 and 60 remained and began throwing rocks and water bottle police said.
Officers deployed less-lethal measures, including pepper balls, and the stragglers dispersed, according to authorities.