Sen. Amy Klobuchar on Friday will highlight federal legislation to block unwelcome “ticket bots,” computer program scalpers that skirt security protocols designed to restrict online ticket purchases for fans.

The bipartisan bill is meant to protect consumers from automated scammers that gobble event tickets in bulk for resale, effectively preventing hundreds of fans from being able to buy seats.

If passed this year, the legislation would prohibit the sale of any ticket that is knowingly obtained by such unlawful methods. A violation would be subject to civil penalties.

For example, last month the official Prince tribute concert sold out almost instantly. While it’s impossible to tell just how many of the highly touted tickets to the concert, to be held next week at Xcel Energy Center, were purchased by bots, they are suspected in contributing to hundreds of tickets that landed on scalping sites — some selling for 1,000 percent above face value.

“Instead of making doves cry, I think they made fans cry,” said Klobuchar, who is co-sponsoring the bill, which passed the Senate Commerce Committee last month.

“Everyone knows when ticket prices soar like that, they’re not going to the actors, [or] the people who are running concessions,” Klobuchar said. “The money is going to scammers, yet it’s out of the pocket of people who really want to see a show or sporting event.”

A Star Tribune analysis earlier this year of 10 spring and summer concerts in the Twin Cities found that 10 to 20 percent of tickets to the most popular shows typically wind up on resale sites, including an inordinate number of the best seats.

Blocks of 10 to 20 adjoining seats were widely available at inflated prices to local shows by Beyoncé, Paul McCartney and Justin Bieber on StubHub and similar sites, even though there was a four- to eight-ticket limit on sales to the general public. Such widespread bundling is often an indicator of either bot scalping or selling by insiders with special access.

Minnesota has some of the most lax scalping laws in the country, with no government oversight on how concert tickets are distributed in venues owned or funded by taxpayers.

Nate Kranz, general manager of Minneapolis’ iconic First Avenue, has been combating bot purchases for tickets to his biggest shows for years. Despite best efforts to limit scalping, Kranz said he spent time scrubbing “shady purchases” for The Revolution’s sold out concert to make sure tickets made it into the hands of regular fans at fair prices.

Red Flags include buyers that all have the same last name from the same ZIP code. When he finds bot purchases, Kranz cancels the sale and releases the tickets back to the general public.

“Certainly the artists hate the bots — and scalping in general — as much as we do,” he said.

Klobuchar will hold a news conference in front of First Avenue Friday morning to promote the Better Online Ticket Sales (BOTS) Act of 2016.