(Adds details, background)
WASHINGTON, March 21 (Reuters) - A federal government spending deal being worked out in the U.S. Congress includes additional funding to boost border security, protect the upcoming elections in November and rebuild aging infrastructure, a source familiar with the negotiations said on Wednesday.
While the source said a final overall spending agreement had not been reached, other Republican and Democratic congressional aides have told Reuters that leaders plan to unveil their agreement on the $1.3 trillion spending bill later on Wednesday.
Lawmakers in the Republican-controlled Congress have until Friday night to reach a deal before a lapse would force federal agencies to suspend operations. The current plan would provide for government funding through Sept. 30, after a series of short-term funding measures implemented since last fall.
Republican leaders in the House and Senate said on Tuesday they were close to a deal and hoped to complete legislation by Friday as they worked to overcome divisions over several thorny issues such as President Donald Trump's proposed border wall.
So far, the package provides $1.6 billion for some fencing along the U.S. border with Mexico and other technological border security efforts, the source said.
Trump had sought $25 billion for a full wall, but negotiations fell through to provide more money in exchange for protections for "Dreamers," young adults who were brought illegally into the United States as children.
The spending plan also provides $307 million more than the Trump administration's request for the FBI to counter Russian cyber attacks, and $380 million for U.S. states to improve their technology before November's congressional election, according to the source.
U.S. intelligence agencies have concluded that Russia sought to meddle in the 2016 presidential election campaign, and intelligence chiefs said last month that Russia will seek to interfere in the midterm elections this year by using social media to spread propaganda and misleading reports. Russia has denied any interference.
The planned spending measure allocates $10 billion for spending on infrastructure such as highways, airports and railroads. It also includes money for the so-called Gateway rail tunnel connecting New York and New Jersey, the source said.
Trump has threatened to veto the bill if the Gateway project is included. While its funds remain, they are directed through the U.S. Department of Transportation, rather than provided directly, Politico reported.
Additionally, lawmakers' added $2.8 billion to address opioid addiction, the source said.
One potential stumbling block includes gun-related provisions prompted by a mass shooting at a Florida high school on Feb. 14 that killed 17 students and faculty members. On Tuesday, as another shooting swept over a high school in Maryland, House Speaker Paul Ryan said lawmakers were still discussing a proposal to improve federal background checks for gun purchases.
Another issue tying up negotiations was tax treatment for grain co-ops versus corporate producers, according to Politico. (Reporting by Richard Cowan, Susan Heavey, Lisa Lambert Editing by Doina Chiacu, Bernadette Baum and Frances Kerry)