WASHINGTON - The Senate has become so deadlocked over the creation of a Homeland Security Department to protect Americans against terrorism that the chances the agency will be established this year have all but vanished.

After a month of debate and fruitless negotiations, senators are likely to put the stalled bill aside this week to consider going to war with Iraq.

President Bush, who wants to bring 22 federal agencies and 170,000 employees into one sprawling department, has run into fierce resistance from Democrats. They oppose his demand for expanded authority to fire or transfer department employees, or to deny them union rights, for national security reasons.

"I'm for workers' rights," Bush said last week at a campaign stop in Denver. "But in the name of national security, this administration, future administrations, need this flexibility to put people in the right place at the right time, in order to protect America from an enemy which still wants to hurt us."

What began after the Sept. 11 attacks as a bipartisan effort to create a new Cabinet-level department has become an election-season fight pitting labor rights against presidential prerogatives. Both parties say they recognize the need for the department. But they differ sharply on the details.

The dispute turned nasty last week, when Bush asserted that Senate Democrats care more about their union supporters than about protecting Americans. In response, Senate Majority Leader Tom Daschle lashed out at the president and his administration, accusing them of politicizing national security.

That rancorous exchange has bled over into negotiations on a resolution to authorize the president to attack Iraq. Daschle, a South Dakota Democrat, said the acrimony had made those negotiations "much harder." But the main casualty might be Congress' ability to complete a homeland security bill this year.

A four-week debate over the 347-page bill has boiled down to a clash over labor rights.

Under current law, presidents can remove federal employees from collective bargaining agreements if national security is at stake. Under Bush's plan, that authority could be applied to the new department's employees. He also wants the flexibility to hire, fire and move employees within the agency.

Democrats and federal unions adamantly oppose the provision. They say they fear that because the new department's mission relates entirely to security, Bush could deny any of its employees union rights.

"How far are we prepared to go in denying essential freedoms and essential protections in the name of national security?" Democratic Sen. Paul S. Sarbanes of Maryland said last week.

Republicans counter by offering examples of how union rights could conflict with national security. Last week, Bush suggested that the privacy rights of Customs Service workers had interfered with the agency's efforts to respond more quickly to emergencies.

Customs employees objected, he said, when managers sought their home addresses and phone numbers to enable the agency to react "if there needed to be a quick response."

Two centrist Democrats, Sens. John B. Breaux of Louisiana and Ben Nelson of Nebraska, and one moderate Republican, Sen. Lincoln Chafee of Rhode Island, offered a compromise last week. Under their proposal, the president could deny union rights only to workers who would take on expanded duties in intelligence or anti-terrorism in the new department.

The proposal mirrors an amendment that Rep. Constance A. Morella, a Montgomery County Republican, tried to attach to a homeland security bill that passed the Republican-led House in July. The White House threatened a veto if Morella's proposal was adopted, and Republican leaders succeeded in defeating it.

Now, Senate Republicans are fighting off the same challenge. Sen. Phil Gramm, a Texas Republican, has joined with a conservative Democrat, Sen. Zell Miller of Georgia, to push a proposal to let the president remove employees from union agreements but require him to provide a written explanation.

Their stated objective is to safeguard the power that presidents have had since 1978 - without limits - to take such action in the name of national security.

"The president of the United States will not sign a bill that diminishes his authority," said Senate Minority Leader Trent Lott, a Mississippi Republican.

Both sides say they are no more than a hairbreadth apart in their positions. But with congressional elections five weeks away, it has become virtually impossible for either party to blink. Neither side has enough support for its alternative to prevail, which has led to a breakdown on the Senate floor.