The last obstacle was cleared when negotiators crafted language to satisfy a Republican demand to give immunity from lawsuits to individuals who report suspicious behavior, something prompted by an incident last fall in which six imams were detained after other passengers reported them as acting suspiciously.
House Homeland Security Chairman Bennie Thompson, D-Miss., said he resolved the final issues after meeting with Senate Homeland Security and Governmental Affairs Chairman Joseph Lieberman, I-Conn.
Under the final agreement, the legislation would require inspection of all cargo arriving in the United States on passenger planes within three years and screening of all U.S.-bound cargo ships for nuclear weapons within five years.
Funding formulas would be realigned so states and cities most at risk of terrorist attack get a larger share.
House Majority Leader Steny Hoyer, D-Md., said the House could vote on the bill Friday, and the Senate is expected to act before leaving at the end of next week for the August recess.
While the White House has expressed its opposition to some parts of the bill, it has stopped short of issuing a veto threat.