Two men were arrested early Thursday in Costa Mesa on suspicion of possession of a controlled substance with intent to sell after officers found about 4,000 Xanax pills and cash in their possession, police said.

Officers responded to the 1200 block of West Baker Street at 1:05 a.m. after receiving a report of a suspicious abandoned vehicle. When officers arrived, they found two men sitting in another car nearby.

Officers searched both suspects and the two vehicles. Police said they found the Xanax pills and more than $500 cash.

Gary Marianetti, 24, of Huntington Beach was arrested on suspicion of possession of a controlled substance for sale and possession of a controlled substance without a prescription. Marianetti also had warrants stemming from three previous drug-related cases, according to Orange County Superior Court records.

Eric Ramirez, 20, of Costa Mesa was arrested on suspicion of possession of a controlled substance for sale, according to police.

hannah.fry@latimes.com

Twitter: @HannahFryTCN