BOSTON — More than 30 federal officers in an airport program intended to spot telltale mannerisms of potential terrorists say the operation has become a magnet for racial profiling, targeting not only Middle Easterners but also blacks, Hispanics and other minorities.

In interviews and internal complaints, officers from the Transportation Security Administration’s “behavior detection” program at Logan International Airport in Boston asserted that passengers who fit certain profiles — Hispanics traveling to Miami, for instance, or blacks wearing baseball caps backward — are much more likely to be stopped, searched and questioned for “suspicious” behavior.

“They just pull aside anyone who they don’t like the way they look — if they are black and have expensive clothes or jewelry, or if they are Hispanic,” said one white officer, who along with four others spoke with The New York Times on the condition of anonymity.

The T.S.A. said on Friday that it had opened an investigation into the claims.

While the Obama administration has attacked the use of racial and ethnic profiling in Arizona and elsewhere, the claims by the Boston officers now put the agency and the administration in the awkward position of defending themselves against charges of profiling in a program billed as a model for airports nationwide.