Congressional leaders on Friday resolved a bitter labor dispute that has held up long-term funding for the Federal Aviation Administration, leading to almost 4,000 federal workers being furloughed last summer and jeopardizing the timeline for a $40 billion overhaul of the nation’s aviation system.

After 22 temporary funding extensions since the last FAA bill expired in 2007, House and Senate leaders reached a compromise on a ruling that made it easier for unions to organize airline staff.

“While some issues remain, there is no reason we cannot resolve them in the coming days and avoid any risk of another FAA shutdown,” said Senate Majority Leader Harry M. Reid (D-Nev.)

It was unclear whether those issues could be wrapped up before the FAA funding extension expires Jan. 31, but the deal struck between Reid and House Speaker John A. Boehner (R-Ohio) removed the major roadblock to reaching an agreement.

Both chambers passed FAA bills in 2011, but a reluctance to bend on the labor issue caused a funding lapse that left 4,000 FAA staff members and about 70,000 people in construction jobs out of work for two weeks last summer.

The FAA has said that running on extensions for more than four years has stymied long-term plans, such as an overhaul of the air traffic management system.

The labor dispute was over a ruling that would make it easier for employees of Delta Air Lines to unionize. House Republicans wanted to undo a ruling of the National Mediation Board (NMB), which said that airline unionization efforts should be decided by a majority of those who vote. The ruling negated a long-standing rule that said eligible voters who opted not to vote would be counted as voting against unionization.

Under the deal reached Friday, which applies narrowly to the Railway Labor Act, which governs airline unionization, a public hearing will be required before the NMB makes future rulings.

It also will change the way union elections are contested if the first ballot does not show a clear winner. Instead of a runoff between the top two unions vying to organize a firm, the top two options would be on the runoff ballot. One could be no union.

The number of workers needed to seek an election or to decertify a union would be 50 percent. Now, 35 percent of workers can seek an election but it takes 50 percent to change unions or decertify.