Land O'Lakes Inc., the giant farmers co-op that is one of the nation's largest producers of milk and butter, said its second-quarter profit rose 22% amid a shift in fortune for its business units.

The company's name-brand dairy foods business experienced a decline in demand from the elevated levels in spring 2020, when the onset of the coronavirus pandemic produced a spike in purchases of butter and milk by consumers.

But its crop-related businesses saw bigger sales and profits.

Land O'Lakes said it earned $100 million on sales of $4 billion in the April-through-June quarter. The sales result was 14% above the year-ago figure.

"We are pleased we've been able to maintain the strength and accelerate the momentum of last year's performance," Beth Ford, the company's chief executive, said in a statement. "Despite increasing costs, the fundamentals of our industry remain favorable."

Even so, Land O'Lakes is heading into a more difficult comparison in the third quarter. It saw the biggest spike in retail demand during the July-through-September period of 2020.

The third quarter historically produces the lowest revenue for Land O'Lakes due to the seasonality of demand for its crop-related goods and services.