A teenage boy told his ex-girlfriend he would shoot up her home, school and her mother's workplace, according to D.C. police, who said he had the assault rifle and ammunition to do it.

D.C. police searched the home of a 17-year-old boy last week after he sent text messages to his ex-girlfriend saying he would kill her and her family, Police Chief Cathy Lanier said Thursday.

Officers found an AK-47 and more than 180 rounds of ammunition in the teen's home in Southeast D.C., court records show. The teen's name was not released.

Police learned of the threats on June 14, when the victim and her mother called for help, records show. Officers went to their home in Greenbelt, Maryland, where the victim showed police text messages from the teen.

In the text messages, the teen boy wrote that three days later, on June 17, he would kill his ex, kill her mother at work and open fire at Eleanor Roosevelt High School in Greenbelt, according to court documents.

The teen also posted video to Instagram showing his ex-girlfriend performing sex acts, she told police, saying he was angry she would not date him again.

The girl told police she knew her ex-boyfriend had multiple guns.

"The gun-recovery unit worked with that young woman through the night, found an on-call emergency judge and interrupted his day, got an emergency search warrant and was able to go and recover an AK-47 from the individual involved," Lanier said Thursday at a news conference.

The police chief stood in front of a display of high-powered firearms police have taken off streets. She spoke angrily of the risks of taking guns out of the hands of criminals and would-be criminals.

"For [officers] to have to put their life on the line against these guns, every single day, and sometimes the same people with new guns over and over again — that's unacceptable," she said.

Greenbelt police intend to charge the teen boy as a juvenile with threats of mass violence, possession of child porn and placing an intimate sexual image online, according to a D.C. Superior Court affidavit.