Flush with cash, Florida legislators ended their annual session Friday by approving a record $77.1 billion state budget that increases money for everything from child welfare to schools to cleaning up water pollution.

The Republican-controlled Legislature voted on the budget and then shut down the 60-day session late Friday night.

The vote closed out a hectic final day that is expected to set the stage for a crucial election year when Gov. Rick Scott and most legislators will be on the ballot.

"We had a great year and we're going to help all Florida families," Scott said shortly after the session ended.

In the final hours, legislators approved a measure that would allow the sale of a strain of low-THC marijuana for medical use. They also voted to allow students living illegally in the country to qualify for in-state tuition rates for college. Both decisions were unthinkable in the past decade for many GOP lawmakers. Scott is expected to sign both.

The Legislature also passed a sweeping bill aimed at overhauling the child-welfare system. The bill states that protecting a child from abuse is paramount and more important than keeping a family together. That's a significant shift for the Department of Children and Families, which has placed a premium on putting fewer children in foster care.

Lawmakers also voted for a bill that will allow the Florida Supreme Court to grant law licenses to non-citizens.

And in a turnabout from last year, the Legislature passed a bill that would allow professional sports teams to qualify for taxpayer money. A similar bill died during the 2013 session.

Legislators also approved an expansion of Florida's private-school voucher program for low-income children, largely along partisan lines. They also agreed to compensate a former farmworker who spent 21 years in prison after being wrongfully convicted of killing his seven children. The bill changes a law that compensates wrongfully incarcerated prisoners so that James Richardson can be paid more than $1 million.

House Speaker Will Weatherford contended that the session would "go down as one of the better sessions that this state has ever had."

But a big focus on the last day was the money.

The state's economic recovery gave lawmakers the luxury of having a $1.2 billion budget surplus even after they had paid for school enrollment and other pressing needs such as growth in the state's Medicaid program.

Most of that surplus was set aside for $500 million in tax and fee cuts, including a rollback in auto registration fees that was signed into law earlier this spring by Scott. The rest of the tax cuts included a three-day back-to-school sales tax holiday in August, as well as tax holidays for hurricane preparation supplies and energy-efficiency appliances.

Senate President Don Gaetz, R-Niceville, insisted that the Legislature was not "awash in cash." And House Speaker Will Weatherford said lawmakers had acted responsibly because they left roughly $3 billion aside for reserves while also cutting taxes.

"This has been a fiscally conservative year, but at the same time there are some needs in the state and we are trying to focus on them," Weatherford said.

But that didn't stop legislators from spreading millions to hometown projects ranging from $2 million to help build an observation tower in downtown Miami to money to expand a gun range in Brevard County.

"I am going to go home and brag about what we have done," said Sen. Alan Hays, R-Umatilla.

Some Democrats, meanwhile, questioned some of the spending priorities, especially the continued resistance of GOP lawmakers to accept federal funding to expand Medicaid coverage. The Legislature has refused to accept the money because it is tied to President Barack Obama's health care overhaul.

"We're moving in the right direction," said Rep. Elaine Schwartz, D-Hollywood. "There's more money around but there's a problem with priorities."