WASHINGTON (Reuters) - U.S. lawmakers are very close to reaching a consensus in days on the Farm Bill, two senior senators said on Wednesday, after months of bitter partisan debate over the legislation to fund $867 billion in food and agriculture programs.

Slideshow ( 2 images )

“We have finally reached a point where I think we’re very close and very encouraged,” Republican Senator Pat Roberts from Kansas, who heads the Senate’s Agriculture Committee, told reporters.

Democratic Senator Debbie Stabenow from Michigan said at the same briefing that she was very encouraged by the progress made.

Programs covered by the bill include crop subsidies and support to access export markets, areas essential for American farmers, a key constituency of President Donald Trump.

Such funding is crucial as farmers suffer from Trump’s trade wars with key commercial partners such as China, normally the top buyer of U.S. farm produce but has been absent from the market after imposition of tariffs.

The latest bill, passed in 2014, expired on Sept. 30 after talks over its replacement broke down. At the heart of the debate was whether or not to impose stricter work requirements for recipients of food stamps.

With Democrats in control of the House, lawmakers have been hopeful the deadlock could be resolved but recently forestry provisions have emerged as a new point of contention, following the deadly wildfires in California earlier this month.

Last week U.S. Agriculture Secretary Sonny Perdue said forest management practices need to be sped up, and he hoped that U.S. agencies could get more authority to do so under a farm bill being debated. “There are things we can do; we need the authority to do that,” he said.

Interior Department Secretary Ryan Zinke said on Tuesday that the deadliest wildfires in California’s history were partly due to lawsuits from environmentalists who have sought to stop forest management practices, such as forest thinning.

Environmental groups and many Democrats have opposed the Republican proposals on forestry issues, saying the government already has powers to prevent fires under current law, and the proposals would increase logging.

Roberts said forestry provisions had been dealt at the leadership level during a meeting late on Tuesday, but declined to elaborate on the outcome.

“The paramount issue ... is farmers need a bill. They need certainty and predictability. So if you have a strong feeling about a particular issue that is in a second place,” he said.