BANGOR, Maine — Drug addicts desperate for prescription pills and those looking to make a quick buck have robbed 18 pharmacies in Maine this year — and Rite Aid pharmacies often have been the target.

At a time when drugstore robberies in Maine — and the nation — are on the rise, nine of the robberies in the state so far in 2012 have been at Rite Aids, authorities say.

The most recent was an armed robbery Wednesday night at the Rite Aid on the corner of Union and Fourteenth streets in Bangor. The same pharmacy was robbed nine days earlier by a man who said he had a bomb.

The prevalence of Rite Aid, which has nearly 4,700 locations nationwide and more than 60 locations in Maine, may have something to do with why they often are targeted. A Rite Aid spokeswoman declined to comment Thursday on that possibility.

Other national pharmacy chains — CVS with five and Walgreens with one — also have been robbed this year in Maine. Three Community Pharmacy locations have been hit.

Pharmacy robberies in Maine, which were virtually nonexistent several years ago, have increased dramatically from just two reported in 2008 to 24 last year.

Mainers’ addiction to diverted prescription pills is to blame, Roy McKinney, director of the Maine Drug Enforcement Agency, said recently.

“Pharmacy robberies in Maine have risen so fast the MDEA [has] worked with the U.S. attorney’s office, ATF and the DEA to create a policy to see whether or not [the crime] qualifies for federal prosecution,” McKinney said.

U.S. Attorney for Maine Thomas E. Delahanty II said recently that most people who rob drugstores are looking for painkillers and other prescription drugs.

“Some people see them as an easy target,” he said of pharmacies. “They know they have the product.”

Some pharmacy robbers are drug addicts looking for a fix and others are drug dealers who are “purely profit-driven,” McKinney said, adding that diverted prescriptions typically sell on the black market for $1 a milligram.

Armed pharmacy robberies in the U.S. rose 81 percent between 2006 and 2010, David Levey, an FBI spokesman, said Thursday.

“There has been a steady increase,” he said.

There were 380 armed pharmacy robberies nationwide in 2006 and the number increased to 501 in 2007, 595 in 2008, 653 in 2009 and 686 in 2010, he said, citing U.S. Drug Enforcement Administration data.

The number of pharmacy robberies — armed and unarmed — in the U.S. was 1,972 for the first six months of 2011, Levey added.

More than 1.3 million pills — mostly highly addictive painkillers such as oxycodone — have been stolen from pharmacies in the last six years, according to the DEA data.

What makes diverted pills, especially painkillers, so dangerous is that people think because a doctor prescribes the drugs they are safe, Mike Wardrop, the U.S. DEA’s resident agent for Maine, said recently.

“They think if a doctor orders it, it’s OK, but it’s not OK,” he said. “Oxycodone is the same as heroin. It’s in the same family.”

When prescribed drugs are abused, users become addicted and desperate, Wardrop said. “There is no segment of the community that [drug addiction] can’t hit.”

Addiction to prescription drugs is a national problem, the drug agent said.

Rite Aid spokeswoman Ashley Flower said each pharmacy has robbery protocols in place and employees work closely with law enforcement, and even their competition, whenever robberies occur.

“We have a variety of measures in place that we use but we don’t really discuss them,” she said Thursday. “We strive to provide an environment that is safe for our employees to work and for customers to shop.”

Flower said the company keeps track of the type of drugs stolen most often and what stores have been robbed, but she did not have the information at her fingertips.

The DEA’s website has posted “What to do” protocol for pharmacists, employees and customers in the event of a pharmacy robbery. It’s designed to protect their safety and assist law enforcement in catching the criminals.

During a robbery, the protocol advises, people inside the pharmacy should avoid taking any action that may provoke violence, give the robber what he asks for but nothing more, and be observant.

“Carefully observe the robber for identifying characteristics, including: clothing, height, weight, race, hair, eyes, nose, scars, tattoos, accent, etc.,” the protocol says.

This first pharmacy robbery in Maine this year took place Jan. 2 at the Rite Aid in Gardiner. It was followed by robberies at:

• Community Pharmacy in Corinth on Jan. 4.

• CVS in Portland on Jan. 13.

• Community Pharmacy in Saco on Jan. 19.

• CVS in Augusta on Feb. 13.

• Rite Aid in Augusta on Feb. 20.

• CVS in Portland on March 6.

• Rite Aid in Guilford on March 10.

• CVS in Waterville on March 26.

• Rite Aid in Camden on March 30.

• Rite Aid in Winslow on April 22.

• Rite Aid in Pittsfield on May 3.

• Rite Aid in Augusta on May 4.

• Walgreens in Windham on May 5.

• CVS in Augusta on May 8.

• Community Pharmacy in Gorham on May 10.

• Two Rite Aid robberies in Bangor on May 21 and May 30.

All pharmacies have video surveillance cameras installed to help catch criminals and so far no one has been seriously injured in a pharmacy robbery in Maine.

The state has been “extremely fortunate” in that regard, Delahanty has said.