U.S. senators writing a comprehensive immigration bill hope to finish their work this week.

Their plan is sure to open a raucous public debate over measures to secure the border, allow tens of thousands of foreign workers into the country and grant eventual citizenship to the estimated 11 million people living here illegally.

The debate will be watched closely from Arizona, which has passed its own legislation to crack down on illegal immigration. Significant parts of that legislation, known as SB 1070, were struck down by the U.S. Supreme Court last year, while the court upheld what proponents called its most significant provision, requiring police to question people about their legal status if there was suspicion over it.

Gov. Jan Brewer, who signed the legislation, has already said she will oppose any federal reform that doesn't lead to border security first. She visited the border earlier this year and called on President Barack Obama to come see for himself what the issues are.

John McCain portrait

Photo: AZPM

U.S. Sen. John McCain, R-Ariz.

Negotiators are already cautioning of struggles ahead for an issue that's defied resolution for years.

Republican Sen. John McCain of Arizona told CBS' Face the Nation that everybody didn't get what they wanted and predicts a "great deal" of unhappiness.

He and Democratic Sen. Chuck Schumer of New York are leading the Gang of Eight senators discussing the legislation. Arizona's other U.S. senator, Republican Jeff Flake, also is a member of the group.

An immigration deal supported by McCain and Flake came close in 2007 but collapsed amid interest group bickering and an angry public backlash.

One of the downfalls of the 2007 legislation was intransigence over a guest-worker program. Reports last week said that labor leaders and business leaders have come to a compromise on that aspect of the reform issue.

The legal path being proposed for the country's estimated 11 million illegal immigrants also is expected to be a major point of contention. Some Republicans are flat opposed to the idea, while others say a route to citizenship should come only when there is assurance the border is secure.

McCain, in town halls he has held in Arizona in recent weeks has been criticized for pushing reform without first ensuring the border is secure.