Senators voted 50-47 -- largely along party lines -- to set aside the original Democratic version of the bill, authored by Sen. Joe Lieberman, D-Conn. They also voted overwhelmingly to limit the number of hours that can be spent in debate on the matter.
Also Wednesday, in a vote 299-121 the House of Representatives passed new legislation to create the Cabinet-level department, bringing Congress to the cusp of passing the bill.
The rapid-fire activity came a day after key Senate Democrats indicated they were willing to bend on the issue of collective bargaining rights for union employees in the new agency.
That issue had been the main roadblock preventing the legislation from moving forward.
The department will still offer union members the right to negotiate and petition a federal labor panel before their collective bargaining rights can be revoked. But under the compromise, the decision to allow unions will ultimately rest with the new secretary of Homeland Security and the president.
Bobby L. Harnage, national president of the American Federation of Government Employees, blasted the bill as a "Trojan Horse" that was more about union busting than national security.
"This terrible piece of legislation gives the president the power to strip unionized workers of their ability to represent themselves on matters as basic as hiring, firing, promotions, appraisals, disciplinary actions, matching pay to job duties -- the bread and butter of democratic unionism," he said.
After passing Wednesday in the House, the bill heads to the Senate, where lawmakers said it would come to a final vote either this week or next.
It still faces opposition from many Democrats, including Majority Leader Tom Daschle of South Dakota, who indicated Wednesday he would not support the compromise.
However, Daschle also said he wouldn't stand in the way of the bill, which appears to have the 60 votes it needs to pass.
"It looks like we may have come to a bipartisan agreement that may allow us to move quickly. We are going to do this. We are going to get this done," said Minority Leader Trent Lott, R-Miss.
The Democrats have temporary control of the Senate with 49 members in the 100-seat Senate and the support of Sen. James Jeffords, I-Vt. The Republicans also have 49 senators.
Sen. Dean Barkley, an independent sworn in on Tuesday as an interim replacement for Paul Wellstone, D-Mo., who died in a plane crash, voted with the Republicans to end the logjam and said he will support a Homeland Security bill compromise.
The White House made passage of the legislation a top priority, and the compromise bill contains almost everything the president wanted. It will bring together 22 agencies, including the Immigration and Naturalization Service, the Coast Guard, the U.S. Border Patrol, the Transportation Security Administration and the Secret Service, in the largest government reorganization in half a century.
The new version of the measure also includes two controversial security measures. It will allow pilots to carry guns in cockpits, a measure already approved in the House and Senate. It will also give airports a one-year extension on a requirement to have all bags screened by the end of 2002.
The bill does not include a provision to create a special blue-ribbon panel to examine U.S. preparedness before the Sept. 11, 2001 terrorist attacks.
Other highlights of the new bill include:
-- Immigration: All immigration responsibilities will be brought under the secretary of Homeland Security. Immigration services, however, will be kept separate from law enforcement functions within the department.
-- Personnel flexibility: Union representatives will be permitted to negotiate, for up to 30 days, changes to current personnel policies. If direct negotiations fail to yield agreement, the president will notify Congress and the issues will be referred to the Federal Mediation and Conciliation Service for 30 days.
If the FMCS is unable to resolve a disagreement, the secretary may notify Congress of the proposed policy change and the reasons for the disagreement. After that, changes proposed by the secretary may be implemented.
-- If the president finds that union presence is having a substantial, adverse impact on Homeland Security, he can exclude collective bargaining rights after he has notified Congress and 10 days have passed.
-- ATF: The Bureau of Alcohol Tobacco and Firearms will be moved from the Treasury Department to the Justice Department to emphasize a focus on law enforcement. ATF revenue collection functions will remain at the Treasury.
-- Research and development: A new provision establishes and funds a Homeland Security Advanced Research Projects Agency to help identify promising technologies.
-- Coast Guard: The Coast Guard will be a distinct organization within the department, retaining and performing all current missions.
-- The bill will be effective 60 days after enactment.
Notable deaths of 2014 [PHOTOS]