Zillow has reached a $130 million settlement with Realtor.com operator Move Inc. and the National Association of Realtors to resolve a legal dispute that once threatened to impose as much as $2 billion in damages against the Seattle-based real estate media giant.

The surprise deal, which comes a week before the scheduled start of trial, ends a high-profile lawsuit over Zillow’s hiring of two former Move execs, Errol Samuelson and Curt Beardsley. Move, owned by Rupert Murdoch’s News Corp, alleged that the former executives stole trade secrets and later tried to cover up their actions by destroying files and other evidence.

Zillow and the executives admitted no wrongdoing as part of the settlement, according to an SEC filing this afternoon. The company’s shares are up 9 percent in after-hours trading.

“Today, we reached an amicable resolution to settle our lawsuit with News Corp and the National Association of Realtors,” Zillow said. “The agreement allows us to put this litigation behind us, and continue our focus on innovation and the huge opportunity in front of us as the consumer-focused market leader.”

Move said in a statement, “We are pleased to have reached an amicable resolution of this litigation. We look forward to putting the matter to rest and returning our full focus to simplifying the real estate process for consumers and the real estate professionals who serve them.”

The potential damages had originally been estimated around $2 billion, but pre-trial rulings by Judge Sean P. O’Donnell had reduced that potential to around $1 billion, if the ultimate verdict had gone in Move’s favor, according to the most recent estimate from Thomas Clapps, litigation desk analyst at Susquehanna Financial Group.

It was an expensive legal battle for Zillow, which spent $27.1 million in the Move case last year, and had estimated that costs could surpass $60 million this year as it defended itself in the lawsuit.

Move alleged in its lawsuit that two of its former execs, Errol Samuelson and Curt Beardsley, stole trade secrets and destroyed documents when they left Move for Seattle-based Zillow. Move has dubbed the actions of Zillow and the co-defendants “corporate espionage” and said that Zillow engaged in a “very regrettable act of executive poaching.” Zillow denied the allegations throughout the case.

Move sued Zillow and Samuelson in March 2014, just 12 days after Samuelson joined Seattle-based Zillow. A judge later barred Samuelson from performing many of his key duties as Zillow’s Chief Industry Development Officer, sidelining the exec for a year. Move sued Beardsley in December 2014.

Testifying in court in April, Zillow CEO Spencer Rascoff denied that the company hired the executives for the purpose of gaining access to the real estate rival’s trade secrets or other confidential information.

“Absolutely not,” replied Rascoff multiple times, when asked whether the company wanted Move and Realtor.com’s trade secrets or hired the executives for that reason. If one of them had suggested as much during employment discussions, “I would have hung up the phone at that very moment,” Rascoff said.

An evidentiary hearing in April focused on allegations that Beardsley and Samuelson destroyed documents and drives containing potential evidence in the case. Beardsley’s lawyer said one of the reasons he wanted to make sure that his laptop computer was wiped clean was due to the fact that he had visited porn sites and “he was mortified to think that others, including work colleagues and industry folks, would find out.”

The pornography component of the case received attention when The New York Post — which like Move is owned by Murdoch’s News Corp. — wrote a story with the headline “Zillow’s defense: Exec was erasing porn, not evidence.” In remarks in court, attorneys for Beardsley noted the common ownership between Move and the New York newspaper, alleging that there was a correlation between the two.

King County Superior Court Judge Sean P. O’Donnell denied Move’s Zillow and Samuelson over those issues. However, citing the actions of Beardsley, the judge granted Move a jury instruction that would have allowed the jury to infer that “the missing evidence would have benefitted plaintiffs’ case or alternatively hurt the defendant’s [case.]”

Beardsley was suspended by Zillow for two weeks without pay in 2015 in part for retaining Move information on his computer after he joined the Seattle company, according to testimony in the case.

The case also brought to light internal Zillow emails, including one in which Rascoff wrote to an industry executive about the hiring of the Move execs, “If you mess with the bull you get the horns. I don’t kid around.” A lawyer for Move also quoted from previously private emails in which Rascoff disparaged the appearance of former Move CEO Steve Berkowitz and Redfin CEO Glenn Kelman.

Zillow’s CEO chided the Move lawyer in court, saying he was putting on a show for the reporters covering the trial by seeking to bring to light potentially embarrassing emails not directly related to the case.