PORTLAND, Ore., Jan 11 (Reuters) - An attorney for a Somali-born man charged with trying to blow up a crowd of people at a Christmas tree-lighting event in Oregon told a court on Friday his client was a hard-partying college student manipulated by FBI agents posing as Islamist militants.

But a prosecutor told jurors during opening statements in the federal trial of Mohamed Osman Mohamud that he acted on his own volition in what he thought was a plan for a mass killing.

Mohamud, a former Oregon State University student and a naturalized U.S. citizen who was 19 when he was arrested, faces life in prison if convicted on a charge of attempting to use a weapon of mass destruction in a plot to blow up the 2010 Christmas tree-lighting festivities at a plaza in Portland.

An FBI affidavit filed in the case said Mohamud was taken into custody after he tried to use a cell phone to trigger what he believed was a car bomb but was actually a harmless device supplied by agents posing as operatives for Islamist extremists.

The fake bomb was planted in a van near a downtown square lined with shops and offices and crowded with thousands of people attending the tree-lighting ceremony.

But defense attorney Stephen Sady argued on Friday his client would never have carried out the bombing on his own.

"Mohamed was no terrorist," Sady said. "The FBI just went too far. They created a crime that would have never happened without them."

Sady called his client a "teenager who talks big and does nothing until the FBI gets involved."

Mohamud, now 21, has spent more than two years in jail as lawyers wrangled over evidence, witnesses and court procedures. Jury selection was completed on Friday in the Portland courtroom of U.S. District Judge Garr King.

During her opening remarks, Assistant U.S. Attorney Pamala Holsinger said Mohamud posted chilling writings to jihadist websites and was "active in this world" before his encounter with the FBI.

Holsinger quoted from what she said were some of Mohamud's writings from before he was arrested.

"'A dark day is coming your way ... by Allah we have soldiers scattered across the globe,'" she said in quoting the writings. "The defendant is one of those soldiers," she added.

Mohamud's attorney and the prosecutor both said he drank alcohol, which violates Muslim beliefs, and smoked marijuana as a college student. But Holsinger argued those behaviors were designed to hide his plans as a militant.

Mohamud's arrest was one of several sting operations in recent years in which individuals were tracked by undercover FBI agents and later tried to detonate fake bombs.

"The only defense (Mohamud's attorneys) can really mount is entrapment," said Tung Yin, a professor at Lewis & Clark Law School. "We've seen this defense with other, similar cases and none have succeeded."

Yin said some defendants in similar cases had pleaded guilty to lesser charges or were found guilty. But he added that Portland jury pools were seen as more liberal than in other areas of the country and more skeptical of the government. (Writing by Alex Dobuzinskis; Editing by Dan Whitcomb and Peter Cooney)