The Massachusetts Senate is planning to debate a sweeping overhaul of the state's gun laws today.

Like a similar bill approved by the House, the Senate proposal would create a web-based portal to allow for real-time background checks in private gun sales and would stiffen penalties for some gun-based crimes. It would also create a firearms trafficking unit within the State Police.

Both bills would strengthen local police chiefs' discretion over issuing firearms identification cards needed to purchase rifles or shotguns, much like the discretion they currently have over issuing licenses to carry concealed weapons.

The bills would also require police chiefs to give written reasons for any applications they deny. Those decisions would have to be based on public safety concerns and could be appealed in court.