Three men have been charged in a months-long probe into what Costa Mesa detectives and federal agents allege was a scheme to distribute counterfeit opioids, authorities said Thursday.

Wyatt Pasek, 21, of Santa Ana, Isaiah Suarez, 22, of Newport Beach and Duc Cao, 20, of Orange are facing one felony count each of conspiracy to distribute controlled substances.

Authorities became aware of the possible scheme in May through a tip from a confidential FBI source about two men in Orange County selling counterfeit pharmaceutical pills.

The investigation culminated Tuesday, when Pasek, Suarez and Cao were arrested and thousands of fake oxycodone pills, a pill press lab and hoards of cash were seized, according to a police affidavit.

Authorities allege the men used fentanyl, a synthetic opioid more powerful than heroin, and a similar drug they bought online to manufacture counterfeit pills designed to look like brand-name oxycodone. The pill press allegedly was used to make the drugs and stamp them with numbers to make them appear legitimate. They were then mailed to buyers, authorities said.

“We recognize that the opioid epidemic transcends the boundaries of our Costa Mesa community, and this case is a prime example of that,” Costa Mesa Police Chief Rob Sharpnack said in a statement Thursday. “Fentanyl is a highly dangerous opioid that contributes heavily to the epidemic.”

The affidavit says one of the men had a business in Costa Mesa, but it does not provide details.

“Using fentanyl in a counterfeit pill that appears to look like a less-lethal opioid dramatically increases the possibility of overdoses and deaths that we see far too often,” U.S. Attorney Nicola Hanna said in a statement.

Authorities allege the men, collectively using the online moniker “Oxygod,” arranged the sales through Dream Market, a marketplace on the dark net “where the primary currency of doing business is bitcoin,” according to the affidavit.

The dark net is an encrypted portion of the internet that is not indexed and not accessible through typical internet browsing software.

The investigation gained momentum in January when detectives with the Costa Mesa Police Department’s special investigations unit staked out a luxury high-rise apartment building on MacArthur Boulevard in Santa Ana, where Pasek lived in a $5,749-per-month unit on the top floor.

Detectives watched as Pasek pulled into the parking garage with Cao riding in a black Lamborghini. Pasek’s luxurious accommodations and exotic cars didn’t seem to jibe with his lack of a “legitimate place of work,” according to the affidavit.

During the investigation, authorities placed devices on Pasek’s Ferrari and SUV and Cao’s Mercedes-Benz and used data from Pasek’s cellphone to track their movements.

Authorities watched for months as Pasek made frequent trips from his apartment to his mother’s house on Bedford Lane in Newport Beach, where he stopped briefly before continuing to Suarez’s apartment at 705 E. Balboa Blvd. Authorities later determined that the Balboa Peninsula apartment was the site of the pill pressing operation, according to the affidavit.

On March 5, authorities said, detectives watched Cao deposit seven packages into a mailbox near the Balboa Boulevard apartment. They waited for Cao to return to the residence and then seized the parcels.

Inside the packages, which were being shipped to addresses in several states, detectives found about 1,400 blue pills marked “A215” and made to resemble 30mg pills of oxycodone. The pills tested positive for fentanyl, according to the affidavit.

On Monday, Cao visited Pasek’s apartment, traveled to Suarez’s apartment and then drove to a post office on Sunflower Avenue in Santa Ana, where authorities later recovered 13 boxes similar to those seized March 5.

The 13 boxes contained more than 4,000 “A215” pills, authorities said.

Authorities arrested the three men a day later as they drove from the Balboa Peninsula apartment.

Law enforcement said a pill press lab was seized at Suarez’s apartment, along with bags containing nearly 3 kilograms of possible counterfeit oxycodone and Xanax pills and other bags containing about 4.5 kilograms of white and blue powders that are being tested.

In Pasek’s apartment, detectives reported finding cash and about 13,000 pills that appeared to be counterfeit oxycodone.

Cao, a citizen of Vietnam who is in the United States on an expired student visa, is scheduled to be arraigned April 23.

Suarez was due in court for a bail hearing Thursday afternoon, and Pasek is due in court Friday.

If convicted, each could face a maximum sentence of 20 years in federal prison, according to the U.S. attorney’s office.

hannah.fry@latimes.com

Twitter: @HannahFryTCN