Gun stocks were rising broadly Tuesday on news that firearms background check data for last month rose nearly 5 percent. The latest figures represented the second-highest May on record.

A hand gun in the Smith & Wesson booth at 144th National Rifle Association (NRA) Annual Meetings and Exhibits in Nashville, Tennessee, last April.

Firearms makers Smith & Wesson and Sturm Ruger were both up about 2 percent midday. Also, , which gets about 20 percent of its revenue from firearms and ammunition sales, was up about 1.5 percent midday, while Sportsman's Warehouse, another gun retailer, was up nearly 3 percent. (Tweet This)

Analysts use the firearms background data as a leading indicator for sales performance in the firearms/ammunition business.

Read MoreAre 3-D printed guns the wave of the future?

The National Instant Criminal Background Check System (NICS) data, showed there were 918,707 adjusted firearms background checks in May 2015, representing a 4.7 percent increase over the same period a year ago. The latest month represented the second-highest May on record for the 17-year-old system. By comparison, NICS adjusted data showed a 0.1 percent decrease in April compared with a year earlier and a 3 percent decrease in March.