WASHINGTON  The arrest on Friday of a Somali-born teenager who is accused of trying to detonate a car bomb at a crowded Christmas tree-lighting ceremony in Portland, Ore., has again thrown a spotlight on the government’s use of sting operations to capture terrorism suspects.

Some defense lawyers and civil rights advocates said the government’s tactics, particularly since the Sept. 11 attacks, have raised questions about the possible entrapment of people who pose no real danger but are enticed into pretend plots at the government’s urging.

But law enforcement officials said on Monday that agents and prosecutors had carefully planned the tactics used in the undercover operation that led to the arrest of the Somali-born teenager, Mohamed Osman Mohamud, 19, a naturalized United States citizen. They said that Mr. Mohamud was given several opportunities to vent his anger in ways that would not be deadly, but that he refused each time.

“I am confident that there is no entrapment here, and no entrapment claim will be found to be successful,” Attorney General Eric H. Holder Jr. said Monday. “There were, as I said, a number of opportunities that the subject in this matter, the defendant in this matter, was given to retreat, to take a different path. He chose at every step to continue.”