WASHINGTON—The Pakistani-American man arrested in an FBI-controlled plot against the capital's subway system drew attention from investigators in January by seeking to travel for jihad overseas, officials said.

Farooque Ahmed, a 34-year-old engineer from Ashburn, Va., and an associate tried to contact a terror group to help them travel to Afghanistan or Pakistan to fight U.S.-led forces there, the Federal Bureau of Investigation said Thursday. The FBI didn't indicate how it learned about the alleged efforts to contact the group.

Investigators soon deemed Ahmed potentially dangerous and orchestrated a fake terror plot that allegedly ensnared him—the latest terrorist sting operation put together by the FBI.

Long used in drug or corruption investigations, the stings have become a staple of the Justice Department's efforts to thwart domestic terrorism since the Sept. 11, 2001, attacks.

Some cases, particularly in the years immediately following 9/11, have had rocky receptions from skeptical juries. But in recent years, juries have handed down lengthy sentences against defendants in sting cases.

Peter Ahearn, a former FBI special agent and now a corporate consultant, said stings help instill fear among jihadi sympathizers that "they're walking in a minefield" and that anyone they contact could be an undercover government agent.

In the case of an attempted bombing in New York's Times Square earlier this year, would-be bomber Faisal Shahzad told investigators he avoided more potent explosives and took other measures to stay out of the view of law enforcement. Shahzad pleaded guilty to terrorism charges in June and was sentenced to life in prison.

An affidavit filed by the FBI to authorize a search of Ahmed's home says that in 2008 and 2009, he bought firearms and trained at a firing range. His ultimate goal, according to the affidavit, was "traveling to Afghanistan to fight and kill Americans."

In April, the FBI arranged a meeting between Ahmed and a person who purported to be an operative with a terror group, prosecutors said. The person was working undercover for the FBI and asked the suspect to help gather information for planned bombings of Metrorail subway stations in Washington's Virginia suburbs, prosecutors said.

Continue reading at The Wall Street Journal