Gov. Deval Patrick has signed a sweeping overhaul of the state's gun laws.

The bill stiffens penalties for some gun-related based crimes, creates a Web-based portal for real-time background checks in private gun sales, and creates a firearms trafficking unit within the state police.

It also lets police chiefs ask a court to deny firearms identification cards needed to buy rifles or shotguns to individuals they feel are unsuitable.

The bill also mandates Massachusetts join the National Instant Background Check System, which requires the state to transmit information about substance abuse or mental health commitments to a federal database police use to review firearms applications.

[Associated Press]