Apparently, they can work it out.

Ending more than two decades of legal wrangling—and potentially opening up iTunes to the crown jewel of music catalogs—the iPod-hawking Apple Inc. and the Beatles' similarly monikered company, Apple Corps, have settled their differences.

The deal, announced Monday, averts a court showdown scheduled for later this month in London. A judge had been scheduled to hear Apple Corps' appeal of a May decision in its latest trademark-infringement suit, in which London's High Court ruled that the computer and gadget maker did not violate the terms of a 1991 agreement by using its fruity logo on iPods and iTunes.

"We love the Beatles, and it has been painful being at odds with them over these trademarks," Apple Inc. CEO Steve Jobs said in a statement. "It feels good to resolve this in a positive manner, and in a way that should remove the potential of further disagreements in the future."

While financial terms were not disclosed, the new deal give Apple Inc. ownership of all of the trademarks concerning "Apple," including the logo for iTunes. In return, the computer maker agreed to license certain trademarks—the ones pertaining to specific music—back to Apple Corps. Both sides also agreed to end litigation and pay their own legal costs.

"It is great to put this dispute behind us and move on. The years ahead are going to be very exciting times for us," said Apple Corps manager Neil Aspinall. "We wish Apple Inc. every success and look forward to many years of peaceful cooperation with them."

Apple Corps was launched in 1968 by John Lennon, Paul McCartney, George Harrison and Ringo Starr to oversee the Fab Four's business interests. It featured a photorealistic green apple as its logo.

Jobs, who cofounded what was then known as Apple Computer in 1977, has previously acknowledged choosing the company name and graphical logo (which, unlike Apple Corps, has a bite missing) in tribute to the Beatles, his favorite band.

His reward: a trademark-infringement lawsuit from the Beatles in 1978. Apple Computer settled that suit in 1981 for $80,000 and a promise to never enter the music business. Apple Corps sued again a decade later over music capabilities in Apple's computers.

In 1991, the companies struck a $26 million settlement to resolve the second dispute. That deal again permitted Apple Corps to control use of the name and image in the musical domain while Apple Inc. was given free reign over its computer endeavors.

When the iPod became a pop-cultural phenomenon and the iTunes store grew into the biggest online music purveyor, Aspinall headed back to court for a third time on behalf of the surviving band members McCartney and Starr and the estates of John Lennon and George Harrison to claim that Jobs' company broke the 1991 deal. The judge, a self-proclaimed iPod owner, disagreed and Apple Corps appealed.

A deal seemed imminent for several weeks. In January, when trumpeting the new iPhone, Jobs proclaimed the company was changing its name to Apple Inc. and expanding its business to include more high-tech gizmos in addition to Macintosh computers.

Aspinall, meanwhile, confirmed months ago that the Beatles were in the process of remastering their entire catalog for online sales. Industry analysts and fans alike point to the just-announced deal as a precursor for the band's iconic songs and albums to finally be sold via iTunes. Some rumor sites have gone so far to predict Jobs unveiling a Beatles-themed iPod.

Now, that could be peachy for both Apples.