HOULTON, Maine — An 18-year-old Houlton man and two boys, one of whom accidentally shot himself, are accused of burglarizing Mac’s Trading Post on Tuesday night.

Houlton Police Chief Butch Asselin said Wednesday that the three teens had planned the burglary earlier that evening with the intent of stealing guns to rob a bank. He said the injured 15-year-old boy loaded a stolen assault rifle in preparation for an armed confrontation with police.

Asselin said the investigation started when the department responded to an alarm at the North Street business just before 10:40 p.m. Tuesday. Officers discovered that someone had used a rock to break the glass in the front door to gain entry to the facility, which sells guns, hunting and fishing supplies, and other goods.

The suspects then allegedly used a hunting rifle to break glass in the display case to steal two assault rifles, two .40-caliber semiautomatic handguns and 100 rounds of .223 ammunition.

Police gathered evidence with assistance from the U.S. Border Patrol and the Aroostook County Sheriff’s Department, U.S. Customs and Border Protection and Maine State Police. Video surveillance equipment showed two suspects entering the business.

Just before 11:30 p.m., police also received a call from a Leonard Street resident who said that a person there had shot himself in the head. Police found a 15-year-old boy with a head wound who said he had accidentally shot himself. Asselin said the bullet grazed the boy’s forehead and scalp area. He was conscious but bleeding profusely and taken to Houlton Regional Hospital.

While investigating the shooting incident, police found a trail of blood that led them from Leonard Street to a location behind a local business where officers found one of the missing assault rifles, a loaded magazine and ammunition.

Asselin said that police knew who the 15-year-old was associated with. They later found Joshua Nason, 18, of Houlton and a 13-year-old boy, also of Houlton.

Nason was charged with receiving stolen property and hindering apprehension. The 13-year-old was charged with burglary and was taken to a holding facility for juveniles in Presque Isle.

Asselin said Wednesday evening that the 15-year-old has not yet been charged. He has been taken to Eastern Maine Medical Center in Bangor for further treatment but is expected to recover.

The chief said that Nason and the 13-year-old told police where the other missing guns were and they were recovered.

Houlton police Sgt. Eric Crouse was the primary investigator. Asselin credited everyone involved for quickly solving the crime.