A student who threatened his Fairfax, Virginia, high school could spend up to five years in prison for the crime.
Ishmael Harrison, 18, pleaded guilty Monday to one count of making threats.
Harrison, a senior at Fairfax High School, sent several messages threatening the school on Twitter on Feb. 21, Fairfax County police say.
"I have been planning this for months now and now I am going to act. Better watch out Fairfax," one tweet read.
"I'm coming and no one can stop me," another tweet read.
His menacing tweets came just days after a school shooting in Parkland, Florida, claimed the lives of 17 people.
Students reported the threats to the school resource officer.
When police initially interviewed Harrison, they found no evidence of firearms. But as their investigation continued, investigators received new information that prompted them to secure a search-and-arrest warrant for Harrison.
During a search of his home, officers found 200 rounds of ammunition used for AR-15 rifles and video of him shooting at a gun range.
No weapon was ever found.
Harrison eventually turned himself in to police to face charges of threatening to commit serious bodily harm to persons on school property and possession of child pornography. Harrison's mother previously said the photos police found were of a friend who is only a few months younger than her son.
The pornography charge was dropped Monday in exchange for his guilty plea.
Harrison faces up to five years in prison when he is sentenced Aug. 17.