A bipartisan group of senators has agreed on a set of principles for a sweeping overhaul of the immigration system, including a pathway to citizenship for 11 million illegal immigrants that would hinge on progress in securing the borders and ensuring that foreigners leave the country when their visas expire.

The senators were able to reach a deal by incorporating the Democrats’ insistence on a single comprehensive bill that would not deny eventual citizenship to illegal immigrants, with Republican demands that strong border and interior enforcement had to be clearly in place before Congress could consider legal status for illegal immigrants.

Their blueprint, set to be unveiled Monday, will allow them to stake out their position one day before President Obama outlines his immigration proposals in a speech Tuesday in Las Vegas, in the opening moves of what lawmakers expect will be a protracted and contentious debate on the issue in Congress this year.

Lawmakers said they were optimistic that the political mood had changed since a similar effort collapsed in acrimony in 2010. Senator John McCain, Republican of Arizona and one of the negotiators, said he saw ‘‘a new appreciation’’ among Republicans of the need for an overhaul.

‘‘Look at the last election,’’ McCain said Sunday morning on ABC’s ‘‘This Week With George Stephanopoulos.’’ “We are losing dramatically the Hispanic vote, which we think should be ours.’’

The senator also said he had seen ‘‘significant improvements’’ in border enforcement, although he said that ‘‘we’ve still got a ways to go.’’

He added, ‘‘We can’t go on forever with 11 million people living in this country in the shadows in an illegal status.’’

According to a five-page draft of the plan obtained by The New York Times on Sunday, the eight senators — including McCain, Democrat Charles Schumer of New York, and Republican Lindsey Graham of South Carolina — have agreed to address the failings of the immigration system in one comprehensive measure, rather than in smaller pieces, and to offer a ‘‘tough, fair, and practical road map’’ that would eventually lead to a chance at citizenship for nearly all illegal immigrants.

‘‘We on the Democratic side have said that we are flexible and we want to get a bill,’’ Schumer told reporters in New York on Sunday. ‘‘But there’s a bottom line and that’s a path to citizenship for the 11 or so million people who qualify. We’ve made great, great progress with our Republican colleagues.’’

Under the senators’ plan, most illegal immigrants would be able to apply to become permanent residents — a crucial first step toward citizenship — but only after certain border enforcement measures had been accomplished.

Among the plan’s new proposals is the creation of a commission of governors, law enforcement officials, and community leaders from border states that would assess when border security measures had been completed. A proposal would also require that an exit system be in place for tracking departures of foreigners who entered the country through airports or seaports, before any illegal immigrants could start on a path to citizenship.

The lawmakers intend for their proposals to frame the debate in the Senate, which is expected to take up immigration this spring, ahead of the House of Representatives. Compared with an immigration blueprint from 2011 that White House officials have said is the basis for the president’s position, the senators’ proposals appear to include tougher enforcement and a less direct path for illegal immigrants than Obama is considering.

In a parallel effort, a separate group of four senators will introduce a bill this week dealing with another thorny issue that is likely to be addressed in a comprehensive measure: ­visas for legal immigrants with advanced skills in technology and science.

The bill, written primarily by Senators Orrin Hatch, Republican of Utah, and Amy Klobuchar, Democrat of Minnesota, would nearly double the number of temporary visas, known as an H-1B, available each year to highly skilled immigrants.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.