A new kind of drugmaker is emerging to meet demand for lower-priced medicines by custom-making drugs, sparking pushback from federal health regulators and legal challenges from traditional pharmaceutical companies.

These companies are marketing cheaper versions of brand-name drugs but they differ from traditional generic-drug makers because they operate much like pharmacies that mix their own medicines, though often in larger quantities. That allows them to skip the regulatory approval process through which traditional drugmakers must prove safety and efficacy of their medicines.

Companies selling custom-made versions of costly drugs—a practice known as “compounding”—say they are meeting demand for alternatives to high-priced drugs.

The U.S. Food and Drug Administration is taking steps that could stymie compounders’ push. Laws don’t allow compounders to merely copy medicines. Drugs may only be compounded under limited circumstances: to address a drug shortage or meet medical need, by modifying the custom-made version—such as adjusting ingredients to address an allergy. In January the agency said high prices aren’t a valid reason.

Meanwhile, pharmaceutical companies have filed lawsuits that seek to stop rivals from compounding drugs at large volumes.