Nielsen has reached an agreement to acquire Tribune Media’s Gracenote digital and data business operations for $560 million in cash, the companies announced Tuesday.

Advanced talks between Nielsen and Tribune Media for Gracenote were previously reported by Variety.

Nielsen’s acquisition of Gracenote is expected to close in the first quarter of 2017. Gracenote supplies reference information for more than 12 million movies and TV episodes, as well as 200 million music tracks, to customers including Apple, Comcast, DirecTV, Sony, Amazon, Ford, Toyota, BMW and Tesla. The company also provides advanced automatic-content recognition (ACR) technology, which was of particular interest to Nielsen as it looks for new ways to measure consumer media consumption.

“Gracenote’s metadata and content-recognition technology fuels the interfaces of the major video, music and in-car infotainment systems that consumers engage with every day,” Karthik Rao, president of expanded verticals at Nielsen, said in announcing the pact. “This acquisition provides Nielsen with a significant asset in our mission of measuring and understanding consumer behavior.”

With the deal, Tribune Media will retain its ownership of sports-oriented consumer websites Covers.com and ProSportsDaily.com. Tribune Media said it expects to receive approximately $500 million in post-tax proceeds from the deal, most which it will use pay down debt with the remainder to be reinvested in the business.

Tribune Media acquired Gracenote from Sony in 2013 for $170 million, and subsequently merged it with its own Tribune Media Services subsidiary, which had been selling TV guide data to operators for several decades. Tribune augmented the Gracenote purchase with the acquisition of film data provider Baseline for $50 million in 2014, followed by the acquisition of sports data specialist SportsDirect for $54 million last year.

“We are extremely proud to have grown our Digital and Data business into a vibrant global enterprise, with talented and creative people who deliver outstanding service to blue-chip clients around the world,” Tribune Media president and CEO Peter Liguori said in a statement. “From a strategic standpoint, however, we are pleased to be streamlining our company so that we can focus even more intently on seizing future opportunities for our local television and entertainment business.”

With the sale of Gracenote, Tribune Media also announced plans to pay a special dividend of $500 million to shareholders in Q1.

Gracenote will operate as a business unit within Nielsen’s Watch segment, and will continue to be based in Emeryville, Calif., and run by CEO John Batter. Nielsen said it expects the Gracenote acquisition to be neutral to 2017 earnings and slightly accretive in 2018.