Agriculture growers have signed off on the major elements of a new program to bring farm workers to the U.S., a key senator said Thursday, moving a major immigration bill a step closer to passage.

Sen. Dianne Feinstein, D-Calif., said the growers have agreed on wages and numbers of visas in the new program, which would allow tens of thousands of farm workers into the country. Those were the big sticking points between the industry and the United Farm Workers, which had agreed to the deal earlier in the week.

“We have a deal on wage and cap,” Feinstein told reporters at the Capitol. “There are still things that they’re going over with respect to worker protections which are in the bill.”

Feinstein said a final deal was very close.

The agriculture workers issue was one of a handful of unresolved details as four Democratic and four Republican senators aimed to unveil a landmark immigration bill, likely early next week.

The goal of the legislation would be to secure the border, create a path to citizenship for 11 million people now living illegally in the United States, and require employers to electronically verify the legal status of their workers. It also would allow tens of thousands of new high- and low-skilled workers into the country on several new visa programs.

As much as 70 or 80 percent of the farm workforce is now illegal, industry and union workers agree, and the legislation would take two approaches to fixing that.

Farm workers already in the country illegally, who have worked in the industry for two years, would have access to a new “blue card” visa granting them legal status and a faster path to citizenship than would be available to others here illegally. They would have to agree to remain in the industry for several more years.

Separately, the legislation would create a new visa program to replace an existing one that growers say is too difficult to use and allows workers into the country only for 10 months at a time. Growers and the UFW had been at odds over how many of these visas should be issued and what wages should be paid to workers who get them, but now those numbers have been agreed on.

Details weren’t clear Thursday, but earlier in the week an official with knowledge of the talks said there was discussion of bringing about 250,000 new farm workers into the country through 2020 and allowing the agriculture secretary to set levels after that. On wages, minimum wage levels were being set for six occupation categories, including crop worker, livestock worker and equipment operator, a different official familiar with the employer perspective on the talks said Thursday. These officials spoke on condition of anonymity because they were not authorized to speak about a formal announcement before it was made public.