A fight broke out in the aisles of office-supply stores last year, costing the maker of Sharpie markers and Paper Mate pens millions of dollars in lost sales.

The battle began when Newell Brands Inc. sporadically stopped shipping the markers and other writing utensils to Office Depot Inc., because it believed the retailer wasn’t spending what the two had agreed on for showcasing and marketing Sharpies and other Newell products, according to people familiar with the situation. Newell also sells Elmer’s glue and Coleman tents.

The result was a hit to Newell’s sales, leading to a 10% decline in fourth-quarter core sales at the “Learn” unit, which includes writing products, Newell said. The poor sales led to a string of director resignations and attracted two activist investors, one of which pushed to oust the chief executive and take control of the company.

A Newell spokesman said the two companies have settled the dispute and declined to provide details of the resolution. An Office Depot spokesman declined to comment.

Despite the fight’s consequences, Newell CEO Michael Polk said he had to draw the line. “These things, you have to be prepared to see them all the way through,” Mr. Polk said in an interview, explaining why he opted to sustain a major sales hit at a tumultuous time for the consumer-products conglomerate. Sales for the unit that includes writing products fell $50 million in the last quarter of 2017, compared with the same period a year earlier.