A woman who pointed a gun at police serving arrest warrants at her apartment was shot and killed by officers after she threatened to kill one of them, Baltimore County police said Monday.

The department said in a news release that a 5-year-old boy who was in the apartment with Korryn Gaines, 23, was shot in a limb and taken to a hospital. Police could not determine if he was shot by the woman or officers.

Three officers went to Gaines' apartment in Randallstown about 9:20 a.m. to serve arrest warrants on her and a man, according to police. Gaines was wanted for failing to appear in court on traffic charges dating from a stop in March, authorities said.

One officer got a key from the landlord and opened the apartment after no one responded to repeated knocks. The officer saw Gaines sitting on the floor, pointing a long gun at him, police said. The officers retreated to the hallway, and a man ran from the apartment with a 1-year-old boy, authorities said. That man was arrested.

Police negotiators tried to talk with Gaines, who they said pointed the gun at tactical officers several times. According to investigators, about 3 p.m., Gaines pointed the gun directly at an officer and said, "If you don't leave, I'm going to kill you." That's went an officer shot at the woman, police said, and Gaines fired two shots.

Gaines was hit several times and pronounced dead at the scene. No officers were hurt. The 5-year-old was taken to a hospital to treat injuries that weren't life threatening. Police have not released the relationship between Gaines and the child.

It is not known of if any of the officers were equipped with body cameras, which the department brought online just a few weeks ago.

Online court records say Gaines was black. The department did not give the races of the officers involved, who were placed on routine administrative leave. Their names will be released 48 hours after the incident, in accordance with the department's contract with the Fraternal Order of Police.