The agreement opens the door to resuming debate on a proposal that would allow many of the estimated 11 million illegal immigrants to remain in the US and eventually to pursue citizenship.
The deal was reached between Senate Majority Leader Bill Frist, a member of President George W. Bush's Republican Party, and opposition Democratic leader Harry Reid.
Senator Edward Kennedy, a liberal Democrat, hailed the deal as 'a major step forward in our fight for tough but fair immigration reform.'
The lower House of Representatives has already passed harsher legislation, which would treat illegal immigrants as felons and threaten them with deportation.
If the Senate approves its version, negotiators for the two chambers would have to iron out differences between the two proposals.