William Ackman has resigned from J.C. Penney Co.’s board as part of a deal to resolve an unusually public battle between the activist investor and the struggling department store operator.

Ackman’s departure could provide some relief from a battle that became a distraction while Penney has been working to fix its ailing business.

The announcement follows statements Ackman made last week saying he’d lost confidence in Penney’s board and that its Chairman Thomas Engibous should be replaced. Ackman and the retailer’s board also were bickering over how quickly the company should replace CEO Mike Ullman.

Ackman’s investment firm, Pershing Square Capital Management, has a nearly 18 percent stake in Penney.

Penney named Ronald Tysoe as a director to fill Ackman’s seat. Tysoe is former vice chairman of Federated Department Stores Inc., which is now Macy’s Inc. Penney will name an additional new director in the near future.

Ackman said in a statement that the moves were “the most constructive way forward” for the Plano, Texas company and all other parties involved. CNBC quoted Ackman as saying that he had no immediate plans to sell his shares.

Penney’s board also made it clear that it continues to support Ullman, who was brought back as CEO in April. Ullman had previously served as Penney CEO from 2004 to 2011.

The resolution caps several days of boardroom drama where Ackman went public with two scathing letters to the board. In them, he noted that the board has “ceased to function effectively.” He also questioned the board’s hiring and firing practices and “aggressive” inventory purchases.

Engibous fired back in a pair of releases saying that Ackman’s comments were “misleading, inaccurate and counterproductive.”

Ullman had replaced Ron Johnson, who was ousted as CEO after 17 months because his radical makeover led to massive losses and sales declines.

Ackman joined Penney’s board in February 2011 after requesting a seat, and was the one who pushed Johnson to be CEO with the lofty goal he would transform the company.

Ackman was seen glowing in January 2012 as Johnson presented his reinvention plan to people including Ralph Lauren and Calvin Klein. The plan called for the elimination of most discounts in favor of “every day” lower prices. Johnson also highlighted his plan to carve Penney into mini-shops devoted to brands or types of merchandise.

But soon after the new pricing strategy was implemented on Feb. 1, 2012, sales plummeted, and so did investor confidence. Penney amassed nearly a billion dollars in losses and its revenue dropped 25 percent for the fiscal year that ended Feb. 2 in the first year of the failed transformation strategy. The trend continued into the first quarter, as Johnson’s legacy remained. Ackman remained Johnson’s supporter until weeks before he was fired.

Since coming back to Penney in April, Ullman has been working to stabilize the business by bringing back basic merchandise and more frequent sales eliminated by Johnson in a bid to attract younger, hipper customers. But many analysts believe that while traffic is improving, there has been no evidence of a turnaround yet as the company heads into the home stretch of the critical back-to-school shopping period.

There are also increasing concerns about Penney’s financial liquidity. Earlier this month the retailer said it expects to finish the second quarter with about $1.5 billion in cash on its balance sheet.

Analysts and suppliers will dissect Penney’s second-quarter financial results on Aug. 20, but analysts expect the numbers to be bad.

Michael Cipriani of Rosenthal & Rosenthal, a lender in the apparel industry, said that last week it put Penney’s suppliers on a short leash, financially backing orders for Penney for just two to three weeks out. The move was intended to limit its exposure until it can see how Penney succeeds with its turnaround efforts.

Rosenthal & Rosenthal is a factor which makes cash advances to suppliers based on the goods they sell to the merchant. The decision was made based on financial information and the boardroom warfare taking place, Cipriani said.

The lender only represents 1 percent of Penney’s suppliers, but it move underscores how uneasy vendors have become. If vendors and factors become wary of a store’s creditworthiness, the retailer may have to pay suppliers cash upfront for goods, which can drain cash quickly.

Penney’s stock was up slightly to $13.18 in early trading today.