BOSTON (AP) -- House lawmakers are gearing up to debate a sweeping bill designed to tighten Massachusetts' already tough gun laws.

An updated version of the bill, set for discussion Wednesday, would require police chiefs or other licensing authorities to give reasons for denying gun licenses to individuals seeking them. Those denials would have to be based on public safety and could be appealed in court.

The bill also would create a web-based portal within the state Executive Office of Public Safety to allow for real-time background checks for private gun sales while stiffening penalties for some gun-based crimes and creating a firearms trafficking unit within the State Police.

House Speaker Robert DeLeo said he met with gun safety advocates and gun owners and believes the bill is fair and comprehensive.

"The bill the House will debate ... represents one of the most effective gun laws in the country," said DeLeo, D-Winthrop, calling the legislation "an important public-safety measure that can serve as a model to other states."

Supporters hope to win final passage in both branches to get the legislation to Gov. Deval Patrick before the formal legislative session ends July 31.

Gun-rights advocates said they were concerned House lawmakers would have less than 24 hours to read the final version of the bill, which was released Tuesday evening, before it goes to the floor for a vote.

Officials with the Massachusetts Gun Owners Action League had previously said they were concerned with what they called the unfettered discretion given to local police chiefs to deny gun licenses.

The bill seeks to improve safety at schools by requiring each district to develop plans to address the mental-health needs of students and faculty and to have access to two-way communication devices with police and fire departments for use during emergencies.

Work on the bill began last year after the 2012 mass school shooting that left 20 children and six adults dead at Sandy Hook Elementary School in Newtown, Conn.

The legislation would also require school districts to provide two hours of suicide awareness and prevention training to school personnel every three years and mandate that the Public Health Department collect and report on suicides in the state.

The bill would also:

-- Eliminate the 90-day renewal process for firearm-identification cards and licenses to carry, and end the classes of a license to carry, formerly known as Class A and Class B;

-- Require gun-license applicants to verify they haven't lost any firearms or had any firearms stolen from them since their last renewal;

-- Increase the penalties for failure to report a lost or stolen firearm;

-- Increase the punishment for being armed with a firearm while carjacking;

-- Increase the punishment for being armed with a firearm while entering without breaking at night or breaking and entering during the day;

-- Increase the penalty for carrying a firearm on school premises.

-- Establish penalties for unlawfully transporting firearms into the state to use in a crime or to unlawfully distribute.