Minnesota has signed a "kill switch" bill that requires all cell phones and tablets sold in the state to feature antitheft software.

The law was signed by Minnesota Governor Mark Gayton, and will take effect on July 1, 2015, according to The Verge.

The legislation aims to discourage theft by allowing smartphone owners to remotely shut off their devices.

If a phone is stolen, users can use the kill switch to lock their phone, rendering it inoperable, CNET reported.

"Cell phone theft is a major concern here in Minnesota and around the country," said Sen. Katie Sieben, the author of the Senate version of the bill. "This legislation, which is the first of its kind in the country, will help reduce the likelihood that people will be robbed of their smart phones."

It will be illegal for retailers to pay cash for used devices. Payments will have to be made with mailed checks, store credit, or electronic transfers. In addition, records of the transactions must be kept.

Police departments across the U.S. have requested this feature, due to the increasing number of smartphone thefts, The Verge reported.

The Federal Communications Commission estimated that one-third of robberies in the U.S. involve smartphones.

The Smartphone Theft Prevention Act, a related bill on the federal level, was approved by the California State Senate last week. The bill was introduced in February in Congress, but remains in committee, CNET reported.

Wireless carriers have opposed efforts to pass "kill switch" laws, arguing that the software makes it easier for phones to be hacked.

However, almost every major smartphone company has promised to offer antitheft software by next July, The Verge reported.

Apple and Samsung currently offer the software for their users, CNET reported.

Apple added an "activation lock" feature in September that needs a user's Apple ID and password to turn off the phone's location tracking or reactivate a phone that is locked. Samsung released a "reactivation lock" feature in April that keeps a locked phone from being made operable again.