A former Marine was sentenced to 25 years in prison Friday for firing shots at the Pentagon and other military facilities in 2010, but federal prosecutors said it was just the start of a violent campaign to register his anger at the wars in Iraq and Afghanistan.

Yonathan Melaku, 24, of Fairfax County told investigators that he wanted people to “be afraid for supporting the war,” so he fired at the National Museum of the Marine Corps in Triangle twice, the Pentagon, and then at Marine Corps and Coast Guard recruiting centers in Northern Virginia. No one was injured.

When he believed that the public wasn’t heeding his message, he planned to deface 2,379 graves at Arlington National Cemetery, shoot at more buildings and then blow up a military fuel tanker truck, according to court documents.

“A terrorist instills fear in the public, and that’s exactly what you did,” U.S. District Judge Gerald Bruce Lee said before he sentenced Melaku in federal court in Alexandria. “You remind me of the snipers.”

Melaku was arrested in June 2011 at Arlington National Cemetery before he could carry out the rest of his campaign. He had a backpack full of spent shells, ammonium nitrate (a component of homemade explosives) and spray paint that he planned to use to scrawl Arabic phrases on the tombstones of those who served in the Iraq and Afghanistan wars.

Yonathan Melaku

Last January, Melaku reached a deal with prosecutors to plead guilty to three charges related to the shootings: injuring property of the United States, use of a firearm during a crime of violence and attempted injury to veterans’ memorials on U.S. property. The agreement called for a 25-year sentence.

In court Friday, Melaku did not speak about the crimes, but his attorneys and family members sketched a portrait of a young man who was delusional and suffering from schizophrenia.

Melaku’s attorneys said they had filed a motion asking for a judge to review the plea deal and had considered an insanity plea after a government doctor’s recent diagnosed mental illness. But on Friday, they withdrew the motion.

They said that Melaku chose to proceed with the plea deal instead of risking a trial and a conviction that could have sent him to prison for 85 years.

Nevertheless, his relatives pleaded for leniency, saying that Melaku was generous, especially toward the poor.

“My son is a sick person, not a terrorist,” the family wrote in a statement read in court. ”He is a kind, respectful and thoughtful person.”

Melaku was born in Ethi­o­pia and raised in Northern Virginia. He enlisted in the Marine Corps in 2007 and became a naturalized citizen in 2009.

In its statement, his family said that after he returned from serving with the Marines, he was a changed person. He began exhibiting bizarre behavior 2010; that year, he was convicted of smashing car windows in Leesburg and served a six-month sentence.

Melaku told investigators that he was radicalized after the Iraq War in 2003.

All five of the shootings occurred in the early morning hours, and prosecutors said they don’t believe that he intended to harm anyone.

In October 2010, Melaku twice fired a 9mm handgun at the Marine Corps museum, damaging windows. During the second shooting there, he recorded a video of himself wearing a ski mask and firing out a window of his car, according to court documents.

“Last time I hit them, they turned off the lights for like . . . four or five days. . . . Punks! ” he is heard saying on the video. “Now, here we go again. This time, I’m gonna turn it off permanently.”

After shooting, Melaku is heard saying “Allahu Akbar” — Arabic for “God is great.”

He fired at the Pentagon in mid-October 2010, striking windows. Later that month, he fired on the Marine Corps recruiting substation in Chantilly, and in November he shot at a Coast Guard recruiting center in Woodbridge.

He was arrested June 17, 2011, after law enforcement officers spotted him in Fort Myer in Arlington County. He dropped his backpack, containing the explosive material and spray paint, and fled but was eventually apprehended at the cemetery.

In a spiral notebook in his backpack, authorities found statements referencing the Taliban, al-Qaeda and Osama Bin Laden.

Melaku “took calculated steps to target specific military buildings, cover up his crimes, and plan even more destruction should his message not be heard,” Neil H. MacBride, U.S. attorney for the Eastern District of Virginia, said in a statement. “This sentence is just punishment for the danger he poses to our community.”