As the Obama administration prepares to announce new curbs on racial profiling by federal law enforcement, government officials said Friday that many officers and agents at the Department of Homeland Security will still be allowed to use the controversial practice, including while they screen airline passengers and guard the country’s southwestern border.

Attorney General Eric H. Holder Jr. is expected early next week to detail long-awaited revisions in the Justice Department’s rules for racial profiling, banning it from national security cases for the first time. The changes­ will also expand the definition of profiling to prevent FBI agents from considering factors such as religion and national origin when opening cases­, officials said.

But after sharp disagreements among top officials, the administration will exempt a broad swath of DHS, namely the Transportation Security Administration and key parts of U.S. Customs and Border Protection, according to law enforcement officials.

The announcement of the new policy comes at a time of rising national protest over allegations that police engage in profiling when investigating and using force against minorities. The debate has been fueled by the recent deaths of three unarmed African Americans at the hands of police in Ferguson, Mo., New York and Cleveland, and the absence so far of criminal charges against the white police officers who were involved.

Civil rights groups and Democratic lawmakers have been pressuring the administration to expand anti-profiling protections since President Obama’s election in 2008, and the Justice Department has been working on the changes­ for five years.

The confrontation in Ferguson: Different stories

President George W. Bush banned racial profiling in 2003, but the prohibition did not apply to national security investigations and covered only race — not religion, national origin or sexual orientation. All of those categories will be covered under the new policy, which will be required for Justice Department agencies, including the Drug Enforcement Administration and the Bureau of Alcohol, Tobacco, Firearms and Explosives, and will be considered guidance for local police, officials said.

Even as the administration imposes what officials called historic limits on profiling practices, it is also set to allow the FBI to continue the policy of “mapping” — under which demographic data about particular ethnic groups is used to designate a particular neighborhood for possible investigations and to recruit informants. This exception could raise the ire, for instance, of American Muslims, who have had a sometimes contentious relationship with law enforcement after the Sept. 11, 2001, terrorist attacks.

The new rules have been delayed in part by a series of internal debates. The FBI, worried that the rules could encumber its agents, resisted at times, people familiar with the debate said.

About six months ago, the Justice Department delivered an initial version of the rules to the White House. This version applied only to the Justice Department, and White House officials balked because they wanted the policies to cover as many agencies as possible. DHS had not been covered by the 2003 racial-profiling rules because it was a newly established department.

In recent months, DHS officials pushed the White House and Justice Department to allow major exclusions for prominent DHS agencies such as the TSA, Immigration and Customs Enforcement, and Customs and Border Protection, officials said. CBP, for instance, will still be allowed to use racial profiling when conducting inspections at the country’s “ports of entry” and interdictions of travelers at the border, officials said.

Some DHS officials also questioned the Justice Department’s authority to set policies for a separate federal agency.

DHS Secretary Jeh Johnson made the case in a series of high-level meetings, arguing that while his department did not condone profiling, immigration and customs agents and airport screeners needed to consider a variety of factors to keep the nation safe, according to officials familiar with his personal efforts. TSA officials, meanwhile, argued that they should not be covered by the new limits on the grounds that the TSA is not a law enforcement agency.

“We tend to have a very specific clientele that we look for,’’ said one federal official involved in immigration enforcement, who spoke on the condition of anonymity to discuss internal deliberations. “If you look at numbers, the vast majority of people we deal with are Hispanic. Is that profiling, or just the fact that most of the people who come into the country happen to be Hispanic?’’

“It’s not like you’re a cop on a beat, which is an entirely different situation,’’ the official added.

As a result, another federal law enforcement official said, “entire swaths of DHS activity are exempt” from the new policy.

But some parts of DHS will be covered, although it could not be determined Friday which ones will have to adhere to the new rules.

A senior administration official called it progress that at least parts of the agency will be covered for the first time. “It’s a huge step forward,’’ said the official, who spoke on the condition of anonymity to discuss internal debates.

DHS press secretary Marsha Catron said Friday in a statement that the agency “continues to work with its federal law enforcement partners to develop guidance that protects the nation and civil rights.” She declined to comment further. The Justice Department declined to comment.

Holder, who is stepping down and has made civil rights a key part of his tenure, said Monday that he would soon unveil rules on racial profiling.

“In the coming days, I will announce updated Justice Department guidance regarding profiling by federal law enforcement,” he said in a speech at Ebenezer Baptist Church in Atlanta. “This will institute rigorous new standards and robust safeguards to help end racial profiling, once and for all. This new guidance will codify our commitment to the very highest standards of fair and effective policing.”