A tug of war has started at the Department of Homeland Security over the Federal Air Marshal Service, the armed undercover agents assigned to commercial flights.

The air marshals want to leave the Transportation Security Administration in favor of the new Bureau of Immigration and Customs Enforcement (BICE). Although both agencies are arms of Homeland Security, the marshals think they have more in common with the many law enforcement agents at BICE than with the TSA's army of security workers who monitor X-ray machines and hand-wand passengers at airport checkpoints.

But the TSA wants the marshals to stay, arguing that the agency would suffer a "significant adverse effect" without them.

The proposed move "reeks of money," said Ivo H. Daalder, a senior fellow at the Brookings Institution who has studied the new department. "The real reason why this is happening is that TSA is under significant pressure from Congress to cut costs and there is a fear within some units of TSA that they will become the victim. They have to prove their worthiness."

In a sign of its financial constraints, the TSA has proposed to use funds targeted for the air marshal program to pay for other needs, according to the House homeland security appropriations subcommittee. The panel recommended a separate account for the marshals outside the TSA.

Asa Hutchinson, Homeland Security's undersecretary for border and transportation security, convened a "working group" in May with representatives from both agencies to review the air marshal situation. He said he and Secretary Tom Ridge will make the decision, and Congress will be notified and weigh in on the proposed change. He could not provide a time frame.

There are about 6,000 immigration and customs investigators in the new immigration bureau. Hutchinson said it might make sense to allow the air marshals to "rotate out" to work in immigration or customs after a period of service. Similarly, immigrations and customs agents could train to become air marshals, if needed, he said. He added that he is not considering diminishing the role of air marshals.

"There's some concern about availability of a career path for the air marshals," Hutchinson said. "We want to maintain morale and capability over the long term."

Daalder said the marshals are likely the first of several units in the department that will be shopping around for a more favorable home. "They merged all these agencies in this mammoth organization and there's a lot of jockeying back and forth among units over who gets what power, when," he said.

TSA chief James M. Loy said losing the marshals would "have a significant adverse effect on aviation security," according to his June 11 memo to Hutchinson. Loy inherited the marshals program from the Federal Aviation Administration and oversaw its expansion from a few dozen agents who flew mostly international routes to the thousands of agents stationed in 21 offices around the country and who fly daily.

But Thomas Quinn, director of the air marshal program, favors moving out of TSA, according to air marshal sources. Quinn has sparred with TSA officials at times over policy issues. Several months ago the TSA, under pressure from the airlines, proposed moving air marshals from first-class to coach seats. Quinn opposed this, arguing that proximity to the front of the plane is part of the strategy to protect the cockpit.

In the memo, Loy says the marshals are part of the multilayered "system of systems" in airport security, and they are "critical to TSA's efforts to collect intelligence data for aviation security." Air marshals need to be quickly deployed in response to a terrorist threat and the marshals' headquarters in Atlantic City monitors the routes of commercial airline pilots who fly with guns in the cockpit.

"The [marshals'] mission is primarily protecting the integrity of an aircraft and its passengers, while BICE's role is more focused on complex investigations of border or immigration offenses against criminal organizations," Loy wrote. "These two functions are significantly distinct and may be incompatible."