Minnesota is joining 18 other states that have laws requiring expanded background checks for firearm purchases and transfers, a change long sought by gun control advocates.

Democrats in control of the Legislature included the change, which takes effect Tuesday, in a sweeping public safety package passed last session. It also includes new rules around owning a machine gun and the creation of extreme risk protection orders — a "red flag law" — that will make it harder for people deemed a danger to themselves or others to get a firearm. Here's what you need to know about the new laws:

Changes to firearm purchases

Rob Doar, lobbyist for the Minnesota Gun Owners Caucus, told members the background check expansion makes significant changes to the purchase and transfer of guns.

The law means that friends and family can't hand over their firearms to someone for a weekend hunting trip. They can, however, loan them within hunting hours if they are together.

Anyone who wants to buy a pistol or semiautomatic military-style assault weapon must first apply for a permit to purchase or carry the weapon. Disqualifying factors include those who are prohibited from possessing such a weapon, are a danger to themselves or the public or are listed in the criminal gang investigative database.

The law also adds a new requirement for private transfers of firearms. Both the owner transferring the gun and the recipient must fill out a record of transfer about the gun and themselves.

Police chiefs and county sheriffs now have 30 days, instead of the previous seven, to process the transfer requests, Doar said. The chiefs and sheriffs also make the determination about danger to self or others. He noted that loaning a firearm to a friend while on a hunting trip together does not require a legal transfer.

New machine gun rules

Another provision taking effect Aug. 1 increases the penalty for owning, possessing or operating a machine gun, trigger activator or machine gun conversion kit. The penalty climbs from five to 20 years. The possible fine goes from $10,000 to $35,000.

The penalty for possession or ownership of a short-barreled shotgun remains at up to five years, $10,000 or both.

The law defines machine gun as any firearm designed to discharge, or capable of discharging automatically, more than once by a single trigger pull. A trigger activator is a removable manual or power-driven trigger device designed to increase the rate of fire or allow a semiautomatic firearm to shoot more than one shot with a single trigger pull.

'Red flag' law effective in January

This new law, which doesn't kick in until Jan. 1, creates extreme risk protection orders (ERPOs), also known as red flag gun confiscation orders, enabling individuals, including family and law enforcement, to petition for an ERPO against someone with a firearm they believe is a danger to themselves or others.

The law details two types of orders: temporary ex parte orders, issued without a hearing based on imminent risk, and final orders, which are issued after a hearing and can last up to a year. Gun control advocates pushed for the change to make it easier for law enforcement and concerned family members to temporarily remove firearms from people in crisis.