Macy's Inc is suing Martha Stewart Living Omnimedia Inc, accusing the company of breach of contract for entering into an agreement to sell certain products at stores run by its rival J.C. Penney Co Inc.

The operator of Macy's department stores says Martha Stewart Living granted it the exclusive right to manufacture and sell certain products under a 2006 agreement, according to a New York state Supreme Court filing on Monday.

Yet in December, J.C. Penney took a large stake in Martha Stewart Living and announced plans to open shops within its stores, starting in 2013, that sell Martha Stewart-branded goods.

Macy's is seeking a preliminary injunction stopping Martha Stewart from violating the contract. It also is seeking an order sealing the lawsuit and motion, saying it is prohibited from disclosing certain information.

The court filing does not detail the products in question.

But Macy's said in a statement that it had renewed its agreement to exclusively sell Martha Stewart-branded product in categories such as cookware, kitchen utensils, bed and bath for another five years, meaning until January 2018.

Macy's said it went to court to enforce the agreement signed by Martha Stewart Living in 2006 in which the right for Macy's to sell product exclusively in these categories was clearly outlined.

Martha Stewart Living said it typically does not comment on legal matters. However, a company statement pointed out Macy's intent to extend its commercial agreement with MSLO to feature and promote the Martha Stewart Collection -- its #1 home brand -- in Macy's stores.

J.C. Penney did not immediately return a call for comment.

The case is Macy's Inc. v. Martha Stewart Living Omnimedia, Inc., 650197/2012, New York state Supreme Court (Manhattan).

(Reporting By Karen Freifeld; additional reporting by Martinne G. Geller and Nivedita Bhattacharjee; Editing by Phil Berlowitz, Bernard Orr)