Police are investigating an officer-involved shooting in Carmel that sent a woman to the hospital and shut down a section of Route 2 on Sunday, authorities said.

A female pedestrian was causing damage and threatening passing motorists on Route 2 early Sunday. When deputies arrived, the woman was carrying a homemade weapon and was shot after she advanced toward a deputy, officials from the Penobscot County Sheriff’s Office told the Portland television station. She was taken to an area hospital for treatment.

The Maine Attorney General’s Office is investigating to determine if the shooting was justified, as it does in all cases in which officers use deadly force. Timothy Feeley, spokesman for the Attorney General’s Office, said no information about the incident would be released Sunday.

The incident was the sixth officer-involved shooting of the year in Maine, according to the Attorney General’s Office. Only one of the shootings involved a fatality.

Stephen McCausland, spokesman for the Maine Department of Public Safety, said the shooting is not related to the search for Robert Burton, wanted in connection with the June 10 killing of his ex-girlfriend, Stephanie Ginn Gebo of Parkman.

People in nine homes in the area were asked to stay indoors during the incident Sunday.

The Carmel Fire Department, Penobscot County Sheriff’s Office and Maine State Police were involved with investigating the incident Sunday. Route 2 in Carmel was closed for about seven hours after the shooting.