A second-quarter surge in sales of personal protective equipment helped Winona-based Fastenal surpass earnings expectations.

The company quickly responded to an increase in demand from governments, first responders and critical infrastructure entities for PPE supplies needed to help stop the spread of the coronavirus.

The PPE sales overcame the decline of fasteners and other industrial supplies at Fastenal’s branch locations, Onsite locations and industrial vending machines.

The Winona-based distributor of fasteners and industrial supplies earned $238.9 million, or 42 cents per share in the quarter, a 17% increase over second-quarter earnings in 2019. Sales increased 10% to $1.5 billion as both sales and earnings exceeded the expectations of analysts.

The early stages of the pandemic caused a big change to the product mix at Fastenal. Sales of safety equipment were 34% of overall sales in the quarter, compared with 17.5% of total sales in the second quarter of 2019.

Meanwhile, fastener sales as a percentage of total revenue declined to 26% in the second quarter, compared with 34.5% in the same period last year.

The company doesn’t expect the sharp increase in PPE sales to continue. It noted that PPE sales were steady in the first two months of the quarter, but by June had started to decline in demand.

“As we enter the third quarter of 2020, and as the chaos surrounding the pandemic and our pipeline of orders lessens, we expect surge-type orders to decline,” it noted in its news release.

Analyst Jeff Windau with Edward Jones wrote in a research note Tuesday that he would maintain his “hold” recommendation on Fastenal’s stock.

“We still expect near-term volatility given the uncertainty with the coronavirus and potential swings in customer orders,” Windau wrote. “Overall, we believe Fastenal’s performance will be aligned with other industrial companies as demand for safety products tapers off.”

The number of new Onsite and vending-machine signings, a key component of Fastenal’s long-term growth strategy, slowed in the second quarter as customers focused on immediate effects of dealing with the coronavirus such as plant closings or work slowdowns.

But as the economy slowly reopened, more attention was paid to strategic decisions.

The company signed 40 new Onsite locations in the second quarter, half of those in June, compared with 85 in the second quarter last year.

In April, the company had halted its guidance for new Onsite and vending-machine installations, and, citing the continued uncertainty about the normalization of economic activity, has chosen not to reinstitute guidance on those signings for the rest of 2020.

Share of Fastenal closed Tuesday $43.40, up 2 cents. Year to date, Fastenal shares have risen more than 17%.