Kmart ( KMRT) said Monday that it will withdraw its royalties lawsuit against Martha Stewart Living Omnimedia ( MSO) in light of a new distribution agreement to extend the companies' partnership by two years.

The relationship, in which Kmart sells Martha Stewart Living's Martha Stewart Everyday brand, will now extend through 2009, Kmart said. The agreement also calls for Kmart to expand the Martha Stewart Everyday product categories it carries and includes a new ready-to-assemble furniture line.

The agreement also eliminates the product category minimum guarantee, but not the aggregate minimum guarantee features of the contract, Kmart said in a press release.

In its lawsuit Kmart filed against Martha Stewart Living, Kmart claimed that the home decorations company wanted it to pay an additional $4 million on products sold in 2003.

"We are delighted that Kmart will continue to be a foundation partner for MSO throughout the decade, and that our two companies have found mutually agreeable ways to improve upon our beneficial relationship," said Sharon Patrick, president and CEO of Martha Stewart Living Omnimedia. "Reaffirming this highly successful partnership is due in large part to our confidence in the strength and acumen of Kmart's new management team."

On March 18, Kmart reported its first quarterly profit since emerging from Chapter 11 bankruptcy protection on May 6, 2003. Kmart had said its relationship with Martha Stewart, who was convicted of obstruction of justice and other charges on March 5, had not affected sales.

In June 2003, Stewart had resigned as chairman and CEO of Martha Stewart Living, but retained the roles of chief creative officer and director. Stewart then stepped down from those positions in March but retained the role of "founding editorial director." She is scheduled to be sentenced on June 17.

Kmart sells Martha Stewart Everyday Home, Garden, Holiday, Colors, Kitchen, Keeping and Decorating, Candles, Baby and accessory product lines. It has about 1,500 stores.

Shares of Kmart closed at $46.95 Friday on the Nasdaq, while shares of Martha Stewart Living closed at $10.63 on the New York Stock Exchange.