A Somali-born teenager who thought he was detonating a car bomb at a packed Christmas tree-lighting ceremony downtown here was arrested by the authorities Friday night after federal agents said they had spent nearly six months setting up a sting operation. The bomb, which was in a van parked off Pioneer Courthouse Square, was a fake -- planted by FBI agents as part of the elaborate sting -- but 'the threat was very real,' Arthur Balizan, the FBI's special agent in charge in Oregon, said in a statement released by the Department of Justice. An estimated 10,000 people were at the ceremony Friday night, Portland police said. Balizan identified the suspect as Mohamed Osman Mohamud, 19, a naturalized U.S. citizen. He graduated from Westview High School in Beaverton, Ore., a Portland suburb, and had been taking classes at Oregon State in Corvallis until Oct. 6, the university said Saturday. Mohamud was charged with trying to use a weapon of mass destruction. 'Our investigation shows that Mohamud was absolutely committed to carrying out an attack on a very grand scale,' Balizan said. 'At the same time, I want to reassure the people of this community that, at every turn, we denied him the ability to actually carry out the attack,' he added. The terrorism attempt was the latest is a string of plots since last year involving Americans or immigrants who had become radicalized, often through exposure to extremist websites. In May, a Pakistani-born American was arrested in the plotting of a car bomb attack in Times Square, and later pleaded guilty. But in contrast to that plan, which the authorities learned about only at the last minute, the FBI had been tracking Mohamud since 2009 and his planning unfolded under the scrutiny and even assistance of undercover agents, officials said. Mohamud was arrested 20 minutes before the tree-lighting ceremony started. As he was taken into custody, he kicked and screamed at the agents and yelled 'Allahu akbar,' an Arabic phrase meaning 'God is great,' the authorities said. Federal agents said Mohamud thought Portland would be a good target because Americans 'don't see it as a place where anything will happen.' 'It's in Oregon; and Oregon, like you know, nobody ever thinks about it,' an affidavit quotes him as saying. The FBI's surveillance started in August 2009 after agents intercepted his e-mails with a man he had met in Oregon who had returned to the Middle East, according to a law enforcement official who described the man as a recruiter for terrorism. According to the affidavit, the man had moved to Yemen and then northwest Pakistan, a center of terrorism activity. Mohamud was then placed on a watch list and stopped at the Portland airport in June when he tried to fly to Alaska for a summer job. Later in June, aware of Mohamud's frustrated attempts to receive training as a jihadist overseas, an undercover agent first made contact with him, posing as an associate of the man in Pakistan. On the morning of July 30, the FBI first met with Mohamud in person to initiate the sting operation. The planning for the attack evolved from there, with Mohamud taking an aggressive role, insisting that he wanted to cause many deaths and selecting the Christmas target, according to federal agents. Reminded that many children and families would be at the ceremony, Mohamud said that he was looking for 'a huge mass' of victims, according to the FBI. He had been dreaming of committing an act of terrorism for four years, Mohamud told undercover agents: 'Since I was 15 I thought about all this things before.' One of the unknowns in the case is the precise role of the unnamed man with whom Mohamud exchanged the intercepted e-mails. According to the affidavit, the man was a student in the United States from August 2007 to July 2008. At some point, while Mohamud was in high school, the two met. In his initial meetings with the undercover agents, Mohamud described his dreams of joining the jihadist cause, and mentioned articles he had written on the subject. Mohamud told the agents that in 2009 he had published three articles on the website Jihad Recollections, which was edited by a Saudi-born American, Samir Khan, from a home in North Carolina. Khan moved to Yemen, where he runs Inspire, an English-language website, on behalf of al-Qaida in the Arabian Peninsula. One of Mohamud's articles was titled 'Getting in Shape Without Weights' and described the need to 'exercise the body and prepare it for war.' It was not clear Saturday whether Mohamud had yet obtained counsel. Defense lawyers in such cases involving sting operations often accuse the FBI of entrapment. Anticipating such claims, undercover agents in Mohamud's case offered him several nonfatal ways to serve his cause, including mere prayer. But he told the agents he wanted to be 'operational,' and perhaps execute a car bombing. In August, Mohamud described the target he had in mind -- Portland's Christmas tree lighting in Pioneer Courthouse Square. The agent asked: 'You know there's gonna be a lot of children there?' Mohamud replied: 'Yeah, I mean that's what I'm looking for.' The agents repeatedly asked him if he was prepared to commit such a violent act. 'I want whoever is attending that event to leave, to leave either dead or injured,' Mohamud told the agents, according to the affidavit. He referred to the Sept. 11 attacks, and how people were forced to jump from the burning World Trade Center towers, calling such violence 'awesome.' For the next several weeks the FBI let the plot play out, assisting Mohamud with the details, providing him with cash, scoping out a parking spot near the square, sketching out the plan on paper. At the end of September, Mohamud mailed bomb components to agents he thought were fellow operatives who would assemble the device. Planning to leave the country afterward, he sent passport pictures to the undercover agent. On Nov. 4, Mohamud went with undercover agents to a remote spot where they exploded a bomb in a backpack. They then drove to his apartment, where he made a video full of apocalyptic phrases. 'Explode on these infidels,' he said, in mixed English and Arabic. On Tuesday, according to the affidavit, Mohamud and the undercover agents met again for final preparations, loading what seemed like parts of a bomb into a vehicle, planning details of the operation. He even told the agents the pseudonym he had chosen for the passport to be used in his escape: Beau Coleman. On Friday, Mohamud and the agents drove to the square, where the police had made sure a parking space had been held open. Mohamud then dialed the number that he thought would set off the bomb. Nothing happened. He was told that to get better reception, he should step out of the car to dial again. Instead, he was arrested. Mohamud is scheduled to appear in federal court here on Monday and faces a maximum sentence of life in prison. In the apartment complex next to a commuter rail line in Beaverton, where members of Mohamud's family are believed to live, no one answered the door Saturday. Voices could be heard inside, but a handwritten sign taped to the door warned against solicitors and trespassers. 'They're not going to answer,' said Itzel Barajas, who lives in the apartment across the outdoor hallway at the complex, Merlo Station Apartments. Bahja Osman was one of several Somali women who visited the apartment. 'We feel very, very sad,' Osman said. 'That's why we're coming -- as a peace.' Osman said she met Mohamud's mother, whose first name she and several others said was Mariam, when they lived at a different apartment complex nearby. She said the Mohamud family came to Oregon several years go 'to study, everybody, to go to school and to live.' Osman said Mohamud's mother was very upset. 'I didn't believe it,' Osman said of the news that Mohamud had been arrested. 'She's surprised, too.' Mohamud attended Jackson Middle School and Wilson High School in Portland before transferring to Westview High School in Beaverton. Brandon Guffey, a classmate of Mohamud who said he had known him since 2002 but had not spoken to him since they went to Wilson, recalled Mohamud as a 'perfectly normal guy' who was quiet, calm and respectful of his teachers. Guffey, 20, said Mohamud had a solid group of friends who were also Muslim, and that he was interested in sports and hip-hop culture. Guffey said Mohamud and his friends never acted in a way he considered extreme, adding that he never heard Mohamud talk about religion or politics. Two acquaintances of Mohamud's family said Mohamud's father worked for Intel, which has offices in Hillsboro, a Portland suburb. They said they thought he worked as an engineer. Kola Ray, who lives in the same apartment complex as the Mohamud family, said she remembered seeing Mohamud very late at night, hanging out with other teenagers near the mailboxes beside the complex's parking lot. She said the image stayed with her because an older man was often with them and seemed to be speaking to them as a group. She said she did know who the man was. Although Mohamud's arrest marks another episode in which a Somali-American has been accused of radical attempts at violence, there was no evidence that Mohamud had any current link to Somalia or was a sympathizer of al-Shabab, a militant Islamic group in Somalia. And despite Mohamud's contacts with militants abroad, officials said he appeared to have acted alone in his pursuit of the bombing here. His case resembles several others in which American residents, inspired by militant websites, have tried to carry out attacks in the name of the militant Islamic movement only to be captured in a sting operation. In a similar case in September 2009, a 19-year-old Jordanian was arrested after placing a fake bomb at a 60-story Dallas skyscraper. The same month, a 29-year-old Muslim convert was charged with placing a bomb at the federal building in Springfield, Ill. And in October, a 34-year-old naturalized American citizen born in Pakistan was arrested and charged with plotting to bomb the Washington subway after meeting with undercover agents and discussing his plans and surveillance activities. On Saturday, Muslim and Arab American leaders in Oregon and southwest Washington condemned the planned attack in a joint statement, calling it 'inexcusable and without any justification in Islam or authentic Muslim tradition.' At a news conference later, representatives of several Portland mosques asserted their confidence in law enforcement officials' actions so far. Afterward, three of the gathered community members bowed in prayer near the entrance to the Portland City Hall. 