SOUTH PORTLAND, Maine (AP) — A 29-year-old man was fatally shot by South Portland police early Monday following a standoff that began after the man threatened suicide, police said.

Police were called at 9:30 p.m. Sunday to a Main Street apartment where a man identified as Michael Norton by the attorney general’s office was threatening suicide 24 hours after an identical incident at the home. Norton was hospitalized after the first incident but later checked himself out of the hospital, police said.

When called again on Sunday, police surrounded the residence and attempted to coax Norton outside, said South Portland Police Chief Edward Googins.

A woman who was also inside the apartment exited shortly after 1:30 a.m. Fifteen minutes later, the man left the apartment and “engaged in an armed confrontation with tactical officers,” Googins said.

Police did not identify the weapon involved, but WGME-TV reported that the man was armed with a knife.

The attorney general’s office was called in to investigate, as it is required to do by law in all incidents involving deadly force by police. Officers Benjamin Macisso and John Sutton fired their weapons, according to spokesman David Loughran. He declined to say how many shots were fired.

The incident was the fifth fatal police shooting in Maine in 2008, according to the attorney general’s office. There were five fatal police shootings in all of 2007, two in 2006, one in 2005 and none in 2004.

South Portland police have been involved in other highly publicized shootings in recent years.

In November 2006, officers Theodore Sargent and Jeffrey Cogswell fatally shot Donald Gray, 40, who had shut himself in his bedroom at his parents’ house with a handgun following an argument with his parents.

Sargent and Cogswell said Gray ignored repeated orders to put down his 9mm pistol and they each shot four times when he raised the weapon and pointed it at Cogswell, an investigation found.

Attorney General Steven Rowe ruled that the officers were legally justified in the shooting.

In October 2006, suspected drug dealer Terrel Dubois opened fire on South Portland Officer Steven Connors and Portland Sgt. Robert Doherty when they attempted to take him into custody.

Connors was hit in the chest, shoulder and hand and was grazed in the head by a fourth shot, but Doherty was injured. The officers returned fire and wounded Dubois in the buttocks and left thigh.

Dubois was convicted and sentenced to 35 years in prison for charges stemming from the shooting.