NEW YORK (Reuters) - A New York state judge could decide as soon as Thursday whether J.C. Penney Co Inc (>> J.C. Penney Company, Inc.) can sell certain Martha Stewart-branded home goods despite rival Macy's Inc's (>> Macy's, Inc.) exclusive deal with the doyenne of U.S. home decor.

The two department store chains are scheduled to give closing arguments Thursday morning, more than three months after testimony ended in the non-jury trial before Justice Jeffrey Oing in state Supreme Court in Manhattan. He could render his verdict from the bench following summations or issue a decision in coming days.

Macy's, which claims exclusive rights to Martha Stewart cookware, bedding and bath products under a partnership first signed in 2006, sued Martha Stewart Living Omnimedia Inc (>> Martha Stewart Living Omnimedia, Inc.) and Penney last year over a deal announced in 2011 to open shops within Penney stores that would carry Stewart-designed goods.

Oing will rule on whether Penney can sell Martha Stewart-branded goods in categories claimed by Macy's. He also will decide whether Penney can sell certain Stewart-designed goods that do not bear her name.

The judge had pressed the companies to settle the dispute and in March ordered them into a month-long mediation effort that failed to yield an agreement.

The Penney plan was part of ex-CEO Ron Johnson's vision to boost sales in the home goods section. Johnson departed after disappointing results and current CEO Mike Ullman abandoned his strategy, making the Martha Stewart shops within Penney less integral to the chain's strategy.

During the trial, Oing denied a request by Macy's to stop Penney from selling its existing inventory of home goods designed by Stewart under the "JCP Everyday" label, but warned that Macy's could be entitled to damages.

Penney and Stewart argued that the Macy's contract allows Stewart to sell branded goods in Martha Stewart retail stores and that the shops within Penney department stores would, in fact, be Martha Stewart retail stores.

"And because the agreement has a very broad definition of 'MSLO Store,' the Martha Stewart Store inside JCP, as contemplated in the partnership agreement between JCP and MSLO, fit well within that definition," Penney's lawyers wrote in a post-trial brief.

Macy's contended in its post-trial brief that Penney's argument had been "crafted at the intersection between ingenuity and gall." It also insisted that its contract gives it exclusive rights over Stewart-designed goods in specific product categories.

Steven Gursky, a branding and intellectual property lawyer who has followed the case closely, said he expected Oing to rule in Macy's favor, though he might allow Penney to sell its JCP Everyday goods.

"I don't see how the judge comes down on the side of JCP or Martha Stewart," he said. "They knew they were buying into a risk, and the risk blew up in their faces."

The trial, which began in February, saw testimony from Stewart as well as Johnson and Macy's CEO Terry Lundgren.

Stewart, whose court appearance drew major media attention, testified that she was "flabbergasted" that Macy's objected to her deal with Penney.

(Reporting by Joseph Ax and Phil Wahba; Additional reporting by Madeline Will; Editing by Jilian Mincer)

By Joseph Ax and Phil Wahba