Hopes that America's 11 million undocumented migrants might be granted a pathway to US citizenship have risen significantly after a bipartisan group of politicians in the House of Representatives reached a tentative deal on reforming the country's immigration laws.

The agreement for comprehensive immigration reform brings the House in line with efforts in the US Senate to bring undocumented migrants, who are mainly Hispanics, out of the shadows. Though details of the proposals are yet to be disclosed, they are understood to broadly echo those enshrined in the Senate bill, with a pathway to citizenship coupled with a toughening of security at the Mexican border.

The announcement on Thursday night that a deal in principle had been reached was all the more dramatic because the search for compromise between the four Republican members of the House "group of eight" negotiators and their Democratic counterparts came close to breaking down earlier in the week. The group of eight is highly diverse, with John Carter and Sam Johnson, both of Texas, coming from the right of the Republican party, while Democrats Xavier Becerra of California and Luis Gutierrez of Illinois are both members of the congressional Hispanic caucus.

"This is historic. The idea that a couple of rock red Republicans could reach agreement with members of the congressional Hispanic caucus, in the US political context that's like Israelis and Palestinians making peace. They speak different languages, and up to now all they've done is fight," said Frank Sharry, director of the immigration reform group America's Voice.

From the little that is known about the House agreement, a few knotty issues remain between the parties. Negotiators are not sure what to do about health insurance – when currently undocumented immigrants are initially granted work permits they will be expected to take out medical coverage but will not be eligible for federal help, raising the question how they will afford it.

There is also an ongoing difference of emphasis between the parties over a guest-worker programme for low-skilled workers. Democratic members of the group of eight want to cap the size of the programme at 200,000 temporary visas a year to protect American workers, while business-friendly Republicans want to raise that ceiling. For now the negotiators have agreed to disagree.

There are also differences between the House model and that adopted by the Senate which could prove hard to overcome when a congressional conference is called to reconcile the two sets of proposals. It is understood that the agreement in the Republican-dominated House imposes a 15-year wait before undocumented migrants can claim US citizenship, compared with 13 years in the Senate iteration.

The House agreement also includes a harsher deadline for the introduction of an "E-Verify" computer database that all US employers would be required to use to check on the immigration status of new recruits. The Senate bill says that E-Verify must be fully operative across the nation within 10 years of the start of the pathway to citizenship, while the House agreement, at the insistence of Republicans, would make the pathway conditional on the employment monitoring system working within five or six years.

Marielena Hincapié, director of the National Immigration Law Center, said there would be challenges ahead in smoothing out these conflicts. She said the onus now switched to John Boehner, speaker of the House, and to the wider Republican leadership.

"The big question now is: will speaker Boehner lead on this? We need the Republican House leadership to run with this and ensure there is a way forward," she said.

Despite the remaining hurdles, supporters of immigration reform agree that the prospects for success are now looking good. Ali Noorani, director of the National Immigration Forum, said: "The amazing part about this is that none of these problems are intractable. They can all be tackled if both sides are willing to compromise, as they do seem to be."

He added: "Both parties realise they have a lot to gain from passing reform and a lot to lose from blocking it."

The bipartisan House agreement is a reflection of how far the Republican party has moved on this issue since last November, when Mitt Romney lost the presidential election having campaigned on a platform of "self-deportation". Latinos voted for Barack Obama over Romney by an overwhelming 71% to 27% – a drubbing which senior Republicans are keen to avoid in 2016.