The senate is to debate the proposal next week.
New renewable four-year Z visa to be created for illegal immigrants allowing employment. After renewal, worker may be eligible for green card
Temporary worker programme to allow 400,000 workers three renewable two-year visas but require them to go home before they can return each time. Their time in the US would earn points towards permanent status
Tighter border security
Merit-based system to gauge skills of future immigrants
Edward Kennedy, a Democrat, thinks the consensus is the best chance in years to secure the country's borders and "bring millions of people out of the shadows and into the sunshine of America".
Arlen Specter, a Republican, said: "No matter what we craft it's going to be attacked from both the right and the left," he said. "This is the best I think that can be done."
One Democratic negotiator said he could not support the compromise, citing the temporary worker programme and fees immigrants would pay for the legalisation.
"I for one cannot settle for something that isn't responsible, or something that creates a bigger problem than already exists," said Robert Menendez.
"It doesn't have to be perfect, but it does have to be fair, humane, and practical."
But George Bush, the president, embraced the breakthrough saying he will sign the bill, which also calls for tougher border security, if it is passed.
"I really am anxious to sign a comprehensive immigration bill as soon as we possibly can. Today we took a good step in that direction," he said.
Immigration is a complex, hot-button issue that has divided the country's political parties in a way that has made it difficult to pass reform legislation.
Hundreds of thousands of Latinos and other immigrants rallied on May 1 to demand amnesty for illegal immigrants.
Last year, Republicans opposed amnesty and blocked consideration of immigration legislation in the House of Representatives, saying it rewarded offenders of US laws.
Several of them condemned the senate compromise, saying it was an amnesty "that treats illegal immigrants better than those who play by the rules and come in the right way".
The House is expected to take up its own version of immigration reform later this year.
Immigrant rights groups called the compromise a first step, but said they wanted to see some changes.
"The package is generous for those who are already here and those who have waited patiently to come legally," said Frank Sharry, executive director of the pro-immigrant National Immigration Forum.
"How the deal treats immigrant families and workers coming in the future is where the biggest problem lies," he said.