A woman who pointed a long gun at police serving arrest warrants at her apartment was shot and killed by officers in a shootout that also left a 5-year-old boy wounded, Baltimore County police said.

After an hours-long standoff, police said in a news release that Korryn Gaines, 23, pointed the gun directly at an officer Monday afternoon and said, "If you don't leave, I'm going to kill you." That's when an officer shot at the woman, police said, and Gaines fired two shots, but didn't strike any officer.

"We discharged one round at her," Police Chief James Johnson told reporters at an evening news conference. "In return, she fired several rounds back at us. We fired again at her, striking and killing her."

Gaines was hit several times and pronounced dead at the scene. The boy in the apartment with Gaines was shot in a limb and taken to a hospital with injuries that weren't life-threatening, but police said they could not immediately determine if he was shot by the woman or officers. Police have not released the relationship between Gaines and the child.

The standoff began after three officers went to Gaines' apartment in Randallstown 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 and the man was wanted for assault, 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 and refused to surrender. Officers staged in the hallway had a clear line of sight through the open door to where Gaines was positioned, police said.

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.

Police said Gaines' bench warrant stemmed from an array of traffic charges, including disorderly conduct and resisting arrest. Gaines was charged after a traffic stop last March.

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.

This is the county's third shooting involving an officer in 2016, and the first fatal shooting involving an officer this year.

Click for more from Fox 45.