ROCKLAND, Maine — Police said that they subdued a man Saturday morning who was carrying a gun downtown and who asked officers to kill him.

The 22-year-old transient, who police are not naming because he has not been charged with a crime, was taken to Pen Bay Medical Center in Rockport following the brief standoff that occurred shortly before 1 a.m., according to Rockland Deputy Police Chief Wally Tower.

The gun that the man brandished turned out to be a realistic-looking toy gun, the deputy chief said.

The incident began when officers noticed the man acting suspiciously downtown. Officers followed him as he walked to Grace Street. The officers called out to him, saying they were not chasing him but wanted to check on his well-being.

The man then started walking toward the officers and pulled out the gun. He put it to his head and told officers to shoot him.

Officers drew their weapons and repeatedly ordered him to drop the weapon. Sgt. Matthew Lindahl and Officers Joel Neal, Scott Redmun, Lloyd Daniels and Jacob Shirley were at the scene during the standoff.

Neal circled around and got behind the man and used a Taser that resulted in the man dropping the gun.

Tower praised the officers for their response and the safe outcome.