Microsoft has settled a legal battle with former executive Kai-Fu Lee and Google, putting an end to a case that had thrust the companies' bitter rivalry into the public spotlight.

The companies refused to give any details about the accord involving Lee, a former vice president at Microsoft who was hired by Google in July.

But the confidential settlement makes two things clear: Lee will be able to work for Google in China, and Microsoft will put up a fight if rivals recruit from its higher ranks.

In brief statements late Thursday both companies said they were pleased with the terms of the settlement. Google and Microsoft refused to elaborate on their comments.

Lee was not available for comment, other than through a statement issued by Google that said he was also pleased with the agreement.

Microsoft had filed a suit against Google in King County Superior Court on July 19, the day after Google hired Lee to run its China operations. The suit cited the terms of a noncompete agreement Lee signed when he became an executive in 2000, which required that he wait a year before doing the same work at a competing company.

At Microsoft, Lee had overseen development of MSN Internet search technology, including desktop-search software rivaling Google's. Lee also had spent the first two years at Microsoft in China establishing the company's Beijing research lab.

Google, based in Mountain View, Calif., countersued July 21 in San Jose, Calif., arguing that California law bans Microsoft from restraining where former employees work.

The trial in Seattle was expected to begin Jan. 9, but both companies had made attempts to settle the case from the beginning.

Until the trial could get under way, King County Judge Steven Gonzalez ruled in September that Lee's job activities with Google would be limited to establishing and recruiting for a Chinese research facility. Gonzalez prohibited Lee from performing other tasks, including setting the budget, research agenda or salary levels for the China operation.

A Google spokeswoman confirmed Thursday that Lee is in China, working under the title of president of engineering, product and public affairs. Lee shares the role with Johnny Chou, whom Google hired from UT Starcom.

The five-month legal dispute over Lee has shed light on bitterness between software titan Microsoft and search-engine king Google, two high-tech powerhouses who seem increasingly to be edging into one another's turf.

Court documents released in September said that Microsoft Chief Executive Steve Ballmer led an obscenity-laced tirade over another former employee's having been hired away by Google.

Ballmer purportedly threw a chair across his office and swore at Google Chief Executive Eric Schmidt, saying, "I'm going to... bury that guy, I have done it before, and I will do it again. I'm going... to kill Google."

Ballmer has called the characterization of his response a "gross exaggeration."

Also last fall, Microsoft released an internal e-mail from a Google executive that suggested the search-engine company pursue Lee, then still a Microsoft executive, "like wolves."