PORTLAND, Ore. -- Federal agents arrested a Somali-born teenager Friday for allegedly attempting to blow up a van he thought was packed with explosives at a Christmas tree lighting ceremony.

The arrest of Mohamed Osman Mohamud, 19, resulted from a sting operation in which the FBI had been communicating with the naturalized U.S. citizen since June, according to the

Associated Press

.

Although Mohamud thought he would detonate the van by dialing a cell phone, the bomb was a fake supplied by the FBI and it never was a threat to the public, the

AP

added, citing federal authorities.

The suspect yelled "Allahu Akbar!" -- Arabic for "God is great!" -- as he was arrested at 5:40 p.m. Friday, according to prosecutors cited by the

AP

.

"The threat was very real," said Arthur Balizan, special agent in charge of the FBI in Oregon who was quoted by the

AP

. "Our investigation shows that Mohamud was absolutely committed to carrying out an attack on a very grand scale."

A White House representative said President Obama was aware of the sting operation before the arrest and was assured that the public was not in danger, the

AP

reported.

Mohamud came up with the plan on his own, according to an anonymous law enforcement official cited by the

AP

.

Officials charged Mohamud with attempted use of a weapon of mass destruction. The charge carries a maximum sentence of life in prison.

The FBI began the sting operation in June after an undercover agent learned that Mohamud had been communicating via email regularly with an "unindicted associate" in northwest Pakistan, according to the

AP

, which cited federal court documents.

The two used coded language, but the FBI believes Mohamud discussed going to Pakistan to prepare for "violent jihad," the documents said.

After the FBI first contacted Mohamud in June, an undercover agent met with him in Portland in July and discussed "violent jihad," according to the documents cited by

AP

.

Mohamud and agents even detonated a bomb in the Oregon wilderness as a trial run for Friday's attempt, the documents said.

This article was written by a staff member of TheStreet.