A judge ruled today that a former Microsoft executive can perform most of the tasks rival Google hired him to do, superseding a temporary restraining order imposed by the judge this summer.

King County Superior Court Judge Steven Gonzalez is still barring Kai-Fu Lee from doing work on products, services or projects he worked on at Microsoft, including computer search technology. But while the judge said that a noncompete agreement Lee signed with Microsoft is valid, he said recruiting and staffing a Google center in China would not violate that agreement.

Lee cannot set budget or compensation levels or define the research that Google will do in China, but he can hire people to work there, the judge said.

Lee had worked at Microsoft since 2000, but left in July to lead Google’s expansion into China.

Microsoft sued Lee and Google soon after, contending that Lee’s job at Google would violate the terms of a noncompete agreement, which prohibits him from doing similar work for a rival for a year. Microsoft also accused Lee of using insider information to get his job at Mountain View, Calif.-based Google.

The case has illuminated the behind-the-scenes bitterness between Microsoft and Google, which is emerging as a formidable competitor to the Redmond software giant.

Google said it hired Lee to have him create an engineering office in China, but Lee is also an expert in computer recognition of language — an important field for search engines such as Google.

In a hearing last week, Microsoft asked Gonzalez to restrict the work Lee could do for Google until its lawsuit goes to trial in January. Gonzalez said in his ruling that the trial would more fully define the rights of both companies under the noncompete agreement.

Google wants Lee to help pick a site for the China facility and begin using his connections there to recruit students and software engineers. In China, companies recruit students in the fall to begin work the following summer. Had Lee been barred from recruiting this fall, he would miss the recruiting season and have to wait until next fall, Google said.