Executives at the highest levels of Apple Corp and Samsung Electronics Co Ltd are in talks about patent litigation between the two companies, a lawyer for Apple said in court.

The disclosure came during a hearing on Friday in the battle over the highly lucrative smartphone and tablet markets, jump-started by Apple's iPhone and iPad.

Apple sued Samsung in April, claiming Samsung's Galaxy line of smartphones and tablets infringe several patents and trademarks. Samsung then countersued, asserting its own patents against Apple.

Apple was Samsung's second-biggest customer last year after Sony, accounting for about $5.7 billion of sales to Samsung mainly by purchasing semiconductors, according to Samsung's annual report.

At a hearing on Friday in a San Jose, Calif. federal court, U.S. District Judge Lucy Koh referenced the close business relationship between the two companies.

Can't we all just get along here? asked Koh, who suggested the companies try to resolve the case through alternative dispute resolution outside of court.

I will send you with box of chocolates, whatever, Koh said.

In response, Apple attorney Harold McElhinny said the case has gotten the attention of executives at the highest levels of the two companies.

Can we get them together? Koh asked.

They are in fact meeting and talking, McElhinny said, without elaborating.

An Apple spokesman declined to comment, and a Samsung representative did not immediately respond to requests for comment.

Samsung's Galaxy products use Google's Android operating system, which directly competes with Apple's mobile software.

Late last month, Samsung filed a request for Apple to hand over the unreleased versions of the iPhone and iPad, saying it would be highly relevant to its defense. A judge had already ordered Samsung to produce similar materials to Apple, Samsung attorneys argued in court filings.

Apple opposed the request, saying it was an attempt to harass Apple into disclosing extremely sensitive trade secrets.

Koh heard arguments on that issue on Friday but did not rule from the bench.

Apple also amended its complaint against Samsung late on Thursday night, asserting additional patents against Samsung.

The case in U.S. District Court, Northern District of California is Apple Inc v. Samsung Electronics Co Ltd et al, 11-1846.

(Additional reporting by Poornima Gupta; editing by Carol Bishopric)