JUNEAU — Alaska lawmakers passed legislation Tuesday establishing a framework to start paying for government services with investment earnings from the $65 billion Permanent Fund — a milestone in the Legislature's years-long fight over the best way to fill the state's massive deficit.

The bill, Senate Bill 26, does not directly affect the size of residents' dividend payments, which would continue to be set by lawmakers on a yearly basis. Instead, it simply caps the Legislature's annual withdrawals from the fund at 5.25 percent of its overall value.

But the proposal does, for the first time, create a long-term framework to spend some of the fund's investment earnings on general government. And that will likely have the effect of diverting cash away from Permanent Fund dividends: The Legislature set the coming year's dividend at $1,600, substantially less than it would have been under a formula tied to investment returns that lawmakers have traditionally used.

The $1,600 dividends represent about 37 percent of this year's total withdrawal from the Permanent Fund, which is roughly $2.7 billion. The remainder of the draw, about $1.7 billion, will go toward filling the state's $2.5 billion deficit.

Next year, the Legislature could decide to spend more of the fund's earnings on dividends, though that would leave a larger deficit to be filled with savings or new revenue-generating proposals, like taxes.

Or, lawmakers could spend more of the fund's earnings on government services and reducing the deficit — though that would leave less money for dividends.

The bill "does not restructure the dividend to the people of Alaska," Eagle River Republican Sen. Anna MacKinnon, who helped negotiate the deal on SB 26 between the House and Senate, said in her floor speech.

"It allows a future Legislature to take up that conversation," she said.

The Senate passed the bill just after noon Tuesday in a 13-6 vote. Wasilla Republican Sen. Mike Shower was absent.

The House followed less than two hours later with a 23-17 so-called "concurrence" vote, which will send the legislation to Gov. Bill Walker's desk.

Walker, who watched Tuesday's debate from visitors' galleries in the House and Senate, told reporters afterward that he would sign the bill.

"It brings stability to the future of the state of Alaska," Walker said. "That's what we wanted."

Tuesday's votes would have been unthinkable just five years ago.

The Permanent Fund, a 40-year-old investment fund seeded with oil revenue, was once dubbed the third rail of Alaska politics, reflecting the mortal peril it posed to politicians who dared to touch it. Since the fund's inception, its earnings have been spent almost exclusively on residents' annual dividend checks.

For decades, Alaska's annual oil tax and royalty revenue was enough to pay for the vast majority of government services without relying on earnings from the Permanent Fund.

But the long-term decline in oil production on Alaska's North Slope, combined with the 2014 crash in oil prices, left the state relying on savings to pay for more than half of its budget.

In late 2015, Walker, along with business- and labor-backed groups, started pushing lawmakers to use some of the Permanent Fund's earnings to fill the deficit. Walker's predecessors had launched similar campaigns during previous oil downturns, though none were successful.

The Legislature defied Walker's push for two years.

Most lawmakers agreed that the Permanent Fund was an appropriate tool to help balance Alaska's budget. But before they would vote for legislation that could reduce constituents' dividends, different legislators from different political parties wanted different ideas attached to it.

Members of the largely-Democratic House majority supported more revenue-boosting measures like taxes, while those in the mostly-Republican Senate majority pushed for provisions to limit government spending.

And both sides had ideas about how the fund's earnings should be split between dividends and government, with House leaders favoring larger PFDs.

Those disagreements kept the Legislature in extended sessions in 2016 and 2017. But by January, lawmakers faced a reckoning: Their primary savings account held less money than they would likely need to make it through another year.

That basic fact accomplished the equivalent of de-electrifying the third rail, making Tuesday's votes all but inevitable.

"There isn't another choice," MacKinnon said in her floor speech. She added: "No one in this body has ever wanted to reduce an individual's Permanent Fund dividend by a single penny. But we are in unprecedented times."

In the end, after three sessions of debate over how the fund should be used to fill the deficit, lawmakers couldn't agree on any of the extras, like taxes or limits on government spending.

Instead, legislative leaders unveiled a stripped-down, three-page version of SB 26 on Tuesday morning that sets the simple, 5.25 percent cap on annual withdrawals from the fund. (The effective withdrawal this year will be slightly less than 4.5 percent, according to Senate leaders, since the calculation of the fund's overall value is pegged to its average size over five years.)

The cap is designed to provide more stability for the managers of the $65 billion fund, who say their investment strategy can be hindered by uncertainty about how much cash lawmakers will ask for in a given year.

The fund's trustees, in a vote earlier this year, "implored" the Legislature to set up a "rules-based framework" for spending investment earnings, according to a Tuesday statement from the state-owned Alaska Permanent Fund Corp., which manages the fund.

"SB 26 is an important milestone for the Permanent Fund," the statement quoted Angela Rodell, the corporation's chief executive, as saying. "It gives us the target we have been asking for in order to craft our investment strategy and will ensure the fund is a resource Alaskans can rely on now and in the future."

But others questioned the value of the legislation. SB 26 is a simple statute, meaning that it can be overriden by any future legislature and governor, noted Rick Halford, a former state senator who's fought changes to the way the Permanent Fund and the dividend program and managed.

Halford, in a phone interview, said he would have voted against the legislation Tuesday.

"As a statute, it's just a paper tiger," he added. "It binds nothing. It limits nothing."

Legislative leaders have said they expect to spend time in subsequent years debating the future of PFDs, and how to balance that program with the need to use the Permanent Fund's investment earnings for government spending.

Some lawmakers have also advanced proposals to enshrine the dividend program in the Alaska Constitution by a public vote, meaning that lawmakers wouldn't be able to tinker with it.

But with the end of their two-year term approaching, those same legislative leaders have also said that they, and their constituents, are too divided to agree on a more ambitious deal.

"This is one step in the direction of a comprehensive fiscal solution for Alaska," House Speaker Bryce Edgmon, D-Dillingham, said in an interview after Tuesday's vote. "It's a step we have to take in lockstep with Alaska voters."