A bipartisan group of senators working on immigration reform is close to a deal that would create a pathway to citizenship for illegal immigrants, according to a report in the Los Angeles Times.

While senators must still negotiate many thorny details, aides familiar with the talks and reform advocates expressed optimism that lawmakers would be able to finalize an accord, the report says.

According to the report, the “Gang of Eight” senators drafting immigration legislation have settled on a bill that would require those here illegally to have a clean criminal record, register with the Department of Homeland Security, pay a fine, and file and pay all back taxes to seek citizenship.

Hopeful citizens would then be granted an interim probationary status, during which they would be ineligible for food stamps, Medicaid or unemployment insurance.

Many of those measures were first unveiled when the Senate group first announced their blueprint for immigration reform in January, but many crucial details remain unresolved.

The senators have not decided how long illegal immigrants would have to wait to apply for permanent status. Any bill including a pathway to citizenship would need to address other immigration issues, including visas for high-skilled workers and a possible guest-worker program.

Some Hispanics and Democratic lawmakers also worry that the process will be so punitive as to discourage illegal immigrants from working toward citizenship.

Another looming issue is how to fund increased border security measures amid Washington’s perpetual budget battles and the spending cuts enacted by the sequester.

Any measure allowing citizenship would face a tough fight in the House, where GOP lawmakers have derided such proposals as “amnesty.” Many Republicans have called for strengthened border security before efforts are made to legalize immigrants already in the country.

But the pathway to citizenship has been one of the biggest hurdles facing immigration reform, and movement on that front is encouraging to advocates of reform.

Many of the Senate group’s principles mirror those of President Obama, and politicians on both sides of the aisle appear to agree Congress faces its best opportunity to fix a broken immigration system since bipartisan efforts collapsed in 2006 and 2007.

Obama has said he expects an immigration reform bill to be signed into law by year’s end, and possibly as early as June.

An early draft of the president’s own plan, which was leaked earlier this year, also provided a path to citizenship. But that plan was roundly criticized by GOP lawmakers for not tying a pathway to citizenship to enhanced border security measures.

Republicans are also motivated to act on immigration reform after Obama took more than 70 percent of the Hispanic vote in the 2012 presidential election.

Sen. Marco RubioMarco Antonio RubioOvernight Defense: Tillerson, Trump deny report of rift | Tillerson says he never considered resigning | Trump expresses 'total confidence' in secretary | Rubio asks Army to kick out West Point grad Rubio asks Army to kick out West Point grad with pro-communist posts GOP establishment doubts Bannon’s primary powers MORE (R-Fla.) has been at the front of the reform push on the GOP side, and has sought to allay the fears of some Republicans skeptical of overhauling the nation’s immigration laws.