Three weeks after the Parkland murders, an emotionally raw Legislature gave final passage Wednesday to Florida's first gun restrictions in three decades and approved $400 million for mental health and school safety.

The vote by a deeply divided House was 67-50 after a debate that lasted nearly eight hours. Once the bill passed, lawmakers saluted and waved to the visitors' gallery and Andy Pollack, whose daughter Meadow died in the massacre.

The gun and school safety bill (SB 7026), which earlier cleared the Senate on a precarious 20-18 vote, goes to Gov. Rick Scott, who said he'll consult with Parkland families but declined to say whether he will sign or veto it.

"When a bill makes it to my desk, I'll do what they don't seem to be doing in Washington," Scott said. "I'm going to review the bill line by line, and the group that I'm going to be talking to, the group that I care the most about because it impacted them so much, is the families."

All 17 grieving Parkland families signed a letter calling for passage of the legislation.

"More needs to be done and it's important for the country to unite in the same way the 17 families united in support of this bill," Pollack said after the vote. "I'm a father and I'm on a mission. I'm on a mission to ensure that I'm the last dad to ever make a statement of this kind."

Pollack asked supporters to join him on the web site RememberMeadow.com.

Scott reiterated his opposition to arming school personnel, but did not say whether he will sign the bill or veto it.

"I've been clear. I don't think we ought to be arming teachers," Scott said.

Under the legislation, anyone buying a firearm from a licensed dealer must be at least 21 years old and wait three days before obtaining a weapon, and Florida would have the first statewide program that allows trained school personnel, except those who exclusively teach, to carry guns.

The controversial school guardian program alone prompted a number of legislators to vote no, including members of the black caucus.

Ten Democrats voted for the bill and 19 Republicans voted against it.

Among the Republicans voting no were Rep. Blaise Ingoglia, R-Spring Hill, chairman of the Republican Party of Florida, and five House members who are running for higher office.

Florida is a state forever transformed by the carnage in Parkland.

Parents say their kids are afraid to go to school. Survivors of the shooting helped launch a national Never Again movement. Florida is on the verge of becoming the first state with a voluntary statewide program to arm school personnel.

Legislators have been bombarded with emails and phone calls on both sides. The National Rifle Association urged its members to lobby for defeat of the bill, saying law-abiding gun owners are being blamed "for an atrocious act of premeditated murder."

The fathers of two Parkland victims, Pollack and Ryan Petty, were in the Capitol urging a yes vote as lawmakers debated all day Wednesday.

"We don't agree on everything, but we came together as families to support the bill and get it passed," said Petty, whose 14-year-old daughter Alaina was one of the 17 victims killed by a teenager with an AR-15-style assault rifle at Marjory Stoneman Douglas High School in Parkland.

Pollack and Petty spoke briefly at a Cabinet meeting and embraced Scott and Cabinet members.

The bill has $25 million to destroy and rebuild Building 12 at the school, where 14 students and three faculty members were shot to death on the afternoon of Valentine's Day, Feb. 14.

An expelled former student at Stoneman Douglas High, Nikolas Cruz, 19, who repeatedly threatened gun violence against others, legally bought an assault rifle last year.

He was indicted Wednesday by a Broward County grand jury on 17 counts of first-degree murder and 17 counts of attempted first-degree murder.

The highly divisive issue of gun safety brought some liberal Democrats and conservative Republicans together, something rarely seen in Tallahassee.

Rep. Shawn Harrison, R-Tampa, recalled meeting with students who rallied two weeks ago in support of legislative action in response to the worst mass shooting at an American high school.

"If you have an agenda for or against gun control, I don't really care about your agenda right now," Harrison told colleagues. "I care about protecting my kids and your kids."

Rep. Jay Fant, R-Jacksonville, a candidate for attorney general, spoke in opposition and called it unconstitutional to prohibit 18-year-olds from buying guns.

"I just can't imagine that after Nikolas Cruz can commit such a heinous crime and then we tell a 20-year-old mother living alone that she can't purchase a firearm to defend herself," Fant said.

The debate in Tallahassee is being watched closely across the country as Florida once again is a bellwether for the rest of the U.S.

Access to guns could be a key issue in the fall election in which Florida voters will elect a new governor.

A racial justice group, The Advancement Project, called on Scott to veto the bill on the grounds that too much of the $400 million is spent on adding more police in schools and too little is devoted to mental health.

The legislation also creates a 16-member commission to investigate the Valentine's Day shooting, including the official response and frequent missed signals about Cruz.

A member of the panel will be Rick Swearingen, commissioner of the Florida Department of Law Enforcement. He said Wednesday that his agency has issued subpoenas and preservation orders to several local government agencies to preserve all relevant records in the case.

"We're not going to rush anything. We're going to be very thorough," Swearingen said.

Wednesday's vote represents the first new gun restrictions since Republicans took control of both houses of the Legislature in 1996.

In 1988, a Democratic Legislature passed a statewide three-day cooling-off period for handguns bought by people 21 and older. That year, lawmakers sided with the NRA and blocked cities and counties from passing more stringent gun laws than the state.

The vote poses political risks for Republicans who must seek support from pro-gun voters in an upcoming primary election, including House Speaker Richard Corcoran, R-Land O'Lakes, a possible candidate for governor.

The horrific carnage at Parkland remains highly emotional for lawmakers.

Pent-up frustration boiled over as black legislators said the state has failed for too long to address gun violence in their communities. Several cited the number of gun-related deaths involving children in their districts.

"This is deadly serious," said Rep. Sean Shaw, D-Tampa, who complained that Republican lawmakers have ignored the level of gun violence in black communities, as he named some of them: "Parramore, Liberty City, Frenchtown."

"We've been screaming for decades. This is a real issue and no one has listened," said Rep. Bobby DuBose, D-Fort Lauderdale. "You couldn't imagine what we're going through."

Democrats said the legislation doesn't go far enough to limit access to guns, especially military-style assault rifles and high-capacity magazines like the kind used in Parkland.

"It hurts when we can do so much and we do so little," said Rep. Patricia Williams, D-Lauderdale Lakes, her voice breaking.

Rep. Carlos Guillermo Smith, D-Orlando, who still grieves over the loss of 49 victims in the Pulse nightclub massacre in 2016, said his constituents view the Legislature's hurried response as "BS," and that putting more guns in schools makes no sense.

"The guardian plan is toxic," Smith said. "My constituents reject it. Too many lives have been taken by gun violence."

Rep. Danny Burgess, R-Zephyrhills, a lawyer, captain in the Army reserve and owner of an AR-15, said: "I'm sorry, guns are not the problem."

Rep. Kathleen Peters, R-Treasure Island, fought back tears as she spoke in favor of the legislation. Peters, a mental health advocate, said the bill belatedly addresses Florida's deficiencies.

"We do not have a coordinated system of care," Peters said. "We have people slipping through the cracks every single day."

How did Tampa Bay’s lawmakers vote on SB 7026?

HOUSE (Wednesday)

Y: Larry Ahern, R-Seminole; Danny Burgess, R-Zephyrhills; House Speaker Richard Corcoran, R-Land O'Lakes; Shawn Harrison, R-Tampa; Chris Latvala, R-St. Petersburg; Amber Mariano, R-Port Richey; Ralph Massullo, R-Lecanto; Kathleen Peters, R-Treasure Island; Jake Raburn, R-Lithia; Chris Sprowls, R-Palm Harbor; J Jackie Toledo, R-Tampa.
N: Janet Cruz, D-Tampa; Ben Diamond, D-St. Petersburg; Jamie Grant, R-Tampa; Blaise Ingoglia, R-Spring Hill; Wengay Newton, D-St. Petersburg; Sean Shaw, D-Tampa; Ross Spano, R-Dover.

SENATE (Monday)
Y: Jeff Brandes, R-St. Petersburg; Bill Galvano, R-Bradenton; Wilton Simpson, R-Trilby, Dana Young, R-Tampa.
N: Tom Lee, R-Thonotosassa; Darryl Rouson, D-St. Petersburg.

Times/Herald staff writer Mary Ellen Klas contributed to this report.