JUNEAU, Alaska (AP) — The Alaska Legislature in the waning hours of a four-month session approved a state spending package that would pay residents about $3,200 this year after a vote that would have boosted the payout to about $3,850 narrowly failed in the House.

The approved amount would be among the largest paid to state residents. The debate over the payment amounts came as the state has forecast higher-than-expected revenues, spurred by high oil prices, but also as Alaskans were feeling the pinch of high fuel, food and other costs.

Senate President Peter Micciche, a Soldotna Republican, said people are struggling and that he was disappointed that lawmakers had the chance “to help with a little bit more” but did not.

A tentative budget agreement reached by House and Senate negotiators Tuesday called for a dividend check from the earnings of the state’s oil-wealth fund of about $2,500 this year, plus a $1,300 “energy relief” check. However, half the funding for the energy checks was to come from a budget reserve account that requires three-fourths support in both the House and Senate for it to be tapped.

Estimates indicated that payments would be around $3,200 if that vote failed or around $3,850 if both chambers had the necessary votes.

The Senate approved the budget 19-1 and reached the required threshold to access the reserve account with a 15-5 vote. Gov. Mike Dunleavy urged representatives to also vote for the higher payout.

The House late Wednesday passed the budget 33-7. Support from at least 30 representatives was needed in a subsequent vote to access the reserve account.

With 29 votes in favor and 10 against, Rep. Grier Hopkins, a Fairbanks Democrat, voted no for the final tally of 29-11. The 11 no votes all came from members of the bipartisan House majority coalition.

Hopkins called it a difficult vote and said he thinks the amount approved will help Alaskans.

Asked if he could face fallout for his vote, Hopkins said he doesn’t think elected officials “should make their votes based on reelection. I think they should make it based on what’s right for their state and all of Alaskans.”

House Minority Leader Cathy Tilton, a Wasilla Republican, told reporters said she felt “sorry for Alaskans tonight.” She said members of her caucus wanted to try to get as much money as possible to Alaskans.

In 2008, the dividend was $2,069. There also was a $1,200 “resource rebate” due to high energy costs, according to the state Permanent Fund Dividend Division.

Dunleavy had called for payments of at least $3,700 but said Thursday he thinks the amount included in the budget will help Alaskans. Dividends are typically paid in the fall. Dunleavy was asked during a news conference if checks might be distributed early.

“That’s a discussion we’re going to have,” he said.

Wednesday marked the constitutional meeting deadline for the regular session. The House and Senate adjourned early Thursday morning, shortly after midnight.

There was a flurry of activity on the final day of the session, with lawmakers passing legislation aimed at strengthening sexual assault laws and at improving reading skills for students.

The education bill, which also includes an increase in a school funding formula, was praised by supporters as significant.

They said it emphasizes early learning and is aimed at helping improve educational outcomes. The measure was included in another bill in the Senate and sent to the House, where it narrowly passed. Critics raised concerns that it could impact local control and said the funding increase was paltry.

Rep. Bryce Edgmon, a Dillingham independent, said the bill “sidesteps the real issue … teacher recruitment and retention.”

The dividend was a key focus in the final days of the session, which has also been the case in past years. The size of the check has become a yearly and sometimes divisive battle.

Most Alaskans get a dividend. There is a yearly application and residency requirements to qualify. Dividends traditionally have been paid using permanent fund earnings, which lawmakers also have come to rely on to help pay for government.

Lawmakers have sought to limit withdrawal amounts for dividends and government. That’s created tension over how much should go to each, and agreement on a new formula has been elusive. Last year’s check was $1,114.