New research suggests that nearly half of urgent care patients leave with an antibiotic prescription, including many circumstances where use of the drugs is not needed.

In a study published last week in the medical journal JAMA Internal Medicine, researchers with the U.S. Centers for Disease Control and Prevention (CDC) warn that the overuse of antibiotics at urgent care clinics may be contributing to the emergence and spread of drug-resistant bacteria.

According to the findings, about 40% of all antibiotics prescribed in the U.S. come from urgent care clinics, half the time for illnesses they are ineffective in treating, such as upper respiratory infections and bronchitis. Unnecessary use of antibiotics has been linked to a risk of so-called “super bug” infections, for which antibiotics may end up unable to treat.

They also analyzed outpatient claims using facility codes to determine what type of facility the person was treated at, such as an urgent care center, retail clinic, hospital-based ER, or doctor’s office. Those were cross-referenced with data on antibiotic prescriptions identified using drug codes.

Health experts have long indicated using antibiotics to treat infections that are not treatable with antibiotics helps to spread antibiotic-resistant bacteria. For example, a 2015 study indicated treating bronchitis with antibiotics was ineffective because most cases of bronchitis are viral, not bacterial.

Data from the new study indicated 39% of patients who participated in urgent care visits were given antibiotic prescriptions. With 2.7 million urgent care visits in 2014, this amounts to more than 1 million patients across the country.

Among 4.8 million emergency room (ER) visits, about 15% received antibiotics, or more than 660,000 patients. Similarly, among about 60,000 retail clinic visits, 36% received antibiotics.

Of 148.5 million doctors office visits, 7% of patients got antibiotics, equaling more than 10 million prescriptions.

The study also indicated respiratory diagnoses that could not be treated with antibiotics accounted for nearly 20% of retail clinic visits. Among those visits, 14% resulted in inappropriate antibiotic prescribing for ailments like asthma or the flu.

The findings also found that 16% of respiratory diagnoses untreatable by antibiotics were seen in urgent care centers, 6% in doctors’ offices, and 5% of ER visits.