Senators writing a comprehensive immigration bill hope to finish their work this week, opening what’s sure to be a raucous public debate about 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.

Already negotiators are cautioning of struggles ahead for an issue that’s defied resolution for years. An immigration deal came close on the Senate floor in 2007 but collapsed amid interest-group bickering and an angry public backlash.

“There will be a great deal of unhappiness about this proposal because everybody didn’t get what they wanted,” Sen. John McCain, R-Ariz., a leader of the eight senators negotiating the legislation, said Sunday. “There are entrenched positions on both sides of this issue.”

“There’s a long road,” said Sen. Chuck Schumer, D-N.Y., appearing alongside McCain on CBS’ “Face the Nation.” “There are people on both sides who are against this bill, and they will be able to shoot at it.”

Schumer, McCain and their “Gang of Eight” already missed a self-imposed deadline to have their bill ready in March, but Schumer said he hoped that this week, it will happen.

“All of us have said that there will be no agreement until the eight of us agree to a big, specific bill, but hopefully we can get that done by the end of the week,” Schumer said.

Another negotiator, Sen. Lindsey Graham, R-S.C., was more cautious, saying on NBC’s “Meet the Press” that he hoped to get the deal done “in the next couple of weeks.”

The lawmakers are facing mounting pressure from immigration advocates. On Wednesday, tens of thousands are expected at a rally outside the Capitol to push the senators to produce their bill, organizers said on a conference call Monday.

“I know that they are working really hard but it is time, right now, that we have this piece of legislation,” said Gustavo Torres, executive director of CASA de Maryland, one of the groups organizing the rally.

Schumer, McCain and other negotiators are trying to avoid mistakes of the past.

A painstaking deal reached a week ago knit together traditional enemies, the U.S. Chamber of Commerce and the AFL-CIO, in an accord over a new low-skilled worker program. The proposal would allow up to 200,000 workers a year into the country to fill jobs in construction, hospitality, nursing homes and other areas where employers say they have a difficult time hiring Americans.

The negotiators also have pledged to move the bill through the Judiciary Committee and onto the floor for debate by the full Senate according to what’s known in chamber jargon as “regular order,” trying to head off complaints from conservatives that the legislation is being rammed through.

A deal on immigration is a top second-term priority for President Barack Obama, and senior adviser Dan Pfeiffer said Sunday that the bill being developed in the Senate is consistent with Obama’s approach — even though the Senate plan would tie border security to a path to citizenship in a manner Obama administration officials have criticized.

Pfeiffer didn’t answer directly when asked on “Fox News Sunday” whether Obama would sign legislation making a path to citizenship contingent on first securing the border. But he suggested Obama was supportive of the Senate plan.

“What has been talked about in the Gang of Eight proposal is 100 percent consistent with what the president is doing so we feel very good about it,” Pfeiffer said. “And they are looking at it in the right way.”