With handshakes and smiles, Alaska lawmakers on a House-Senate budget committee Wednesday evening moved a final $5 billion budget compromise that they said was expected to pass the full Legislature on Thursday.

The deal resolves legislators' main sticking point -- scheduled pay raises for state employees -- by granting the raises but asking the administration of Gov. Bill Walker to limit future increases in light of a massive state budget gap.

Negotiations among three factions of lawmakers took the Legislature nearly eight weeks beyond the scheduled conclusion of its 90-day session, and within three weeks of a government shutdown.

But a deal finally emerged late Wednesday, when the House-Senate budget conference committee took less than 10 minutes to formally adopt the pieces of the compromise.

"I'm feeling very confident right now," Rep. Steve Thompson, R-Fairbanks, a member of the committee, said afterward.

For nearly two weeks, the Republican-led majority in the Senate was at an impasse with the House, where the Republican-led majority and Democratic minority passed their own compromise $5 billion spending plan.

All three groups of lawmakers need to agree for the two chambers to reach the three-quarters voting threshold required to tap billions of dollars in a state savings account to pay for the budget.

Senate Republicans initially refused to sign off on a provision in the House compromise bill that funded pay raises for state workers by cutting an unspecified $30 million from state government -- which the administration of Gov. Bill Walker said would likely lead to layoffs.

The new budget deal under consideration would keep the raises, but it includes language asking the Walker administration to hold pay rates flat when it negotiates new contracts. It also asks that the contracts include provisions allowing them to be renegotiated if the price of oil goes below $45 per barrel or above $95 per barrel.

Money from oil taxes and royalties makes up the majority of Alaska's revenues, and a price crash and reduced production have opened a multibillion-dollar gap in the state budget.

The budget proposal, said House Speaker Mike Chenault, R-Nikiski, "doesn't guarantee that there's going to be any increase or decrease in salary" based on rising or falling oil prices. But it allows the state "to have that conversation," he added in an interview Wednesday afternoon.

Terms of the deal were outlined in a letter to Walker dated Tuesday from the co-chairs of the conference committee, Sen. Pete Kelly, R-Fairbanks, and Rep. Mark Neuman, R-Big Lake.

The plan also had the endorsement of the Democratic minority, said Rep. Chris Tuck, D-Anchorage, the leader of that group.

"I think it'll work -- and you can say I said it with a smile on my face and a sigh of relief," Tuck said in an interview Wednesday afternoon, with a smile on his face.

In a prepared statement about the letter issued Wednesday evening, Walker said: "We are reviewing it and discussing it with all of the parties."

Asked about the proposed budget deal, Jim Duncan, the executive director of the state's largest public employee union, the Alaska State Employees Association, said his group does not negotiate with the Legislature.

But, he added: "We understand the financial condition of this state, and we expect to be reasonable."

The full House and Senate now have to formally agree to the deal passed by the conference committee late Wednesday, and both have floor sessions scheduled for Thursday.

In addition to the pay raises, the compromise budget also preserved about $15 million sought by House Democrats for areas like public broadcasting and the state ferry and university systems.

One Democratic committee member, Golovin Sen. Donny Olson, said minority members didn't get all they wanted in this year's budget.

"But thanks to the House minority, it kept us in the ball game," he said in an interview after the conference committee meeting.

Rep. Les Gara, D-Anchorage, pointed out that many of his caucus's priorities were left out of the final package, including expansion of the public Medicaid health care program and eliminating $200 million worth of tax credits for oil companies.

Republican House members noted that the final spending package passed by the conference committee is essentially the same as the compromise measure passed by their chamber two weeks ago, before it was rejected by the Senate.

"I'm glad the Senate finally found its way to our path," said Rep. Charisse Millett, R-Anchorage, the House majority leader.

Kelly, a key figure in the budget negotiations as co-chair of the Senate Finance Committee, defended Wednesday's compromise by saying it set guidelines to keep future labor costs in check.