Saturday night, officers saw a black sedan traveling south on Shaffer and Bellevue Road.
The car did not have headlights on so officers pulled it over.
The suspects were active gang members and were found with open containers of alcohol.
An unregistered, loaded firearm was also located along with a box full of ammunition.
Police say the driver of the vehicle was Jonathan Suarez, the passenger was Cesar Perez.
Both men were booked into the Merced County Jail for multiple gun-related charges.