A federal judge has sided with Google Inc. in a lawsuit alleging the U.S. Department of Interior improperly favored Microsoft Corp. in a deal that could have had ripple effects on future software contracts with other federal government agencies.

The U.S. Court of Federal Claims ruling unsealed late Tuesday blocks the Interior Department from awarding Microsoft a five-year contract to run its new e-mail system by a planned Jan. 25 deadline.

Susan Braden, the federal judge overseeing the two-month-old case, issued a preliminary injunction after concluding the Interior Department had rigged the bidding to give Microsoft the upper hand despite Google's repeated attempts to prove it could meet the government's security and technology requirements.

Google contended the Interior Department stifled competition by demanding that all bids include Microsoft's suite of business software, including its Outlook program for e-mail and scheduling.

Although it still makes most of its money from selling Internet ads, Google has spent hundreds of millions of dollars in the past four years assembling an e-mail system and other software applications aimed at luring customers away from Microsoft in an attempt to siphon revenue away from its fiercest rival.

Braden backed Google in a 27-page ruling that quoted the company's rationale for filing the lawsuit in late October. She agreed that the Interior Department's prerequisites threatened to create an "organizational lock-in" that would have given Microsoft a "significant prejudicial, if not insurmountable, advantage in future competition."

The Interior Department could still appeal the injunction, a process that would likely take months to resolve. The agency declined to comment Wednesday, citing its policy against discussing active lawsuits.

Google, based in Mountain View, Calif., said it was pleased with the decision because it's "a proponent of open competition on the Internet and in the technology sector in general."

Microsoft, based in Redmond, Wash., said Braden's ruling glossed over the Interior Department's concerns about Google's ability to fulfill its security standards. Awarding the contract to Microsoft "is in the best interests of the government and taxpayers," the company said in a statement.

Although not all the financial details have been revealed in the proceedings, court documents indicated that the Interior Department was prepared to pay as much as $59.3 million over a five-year period for an e-mail system built for about 85,000 employees. The agency has been relying on a crazy quilt of e-mail systems for years, creating logistical headaches and unnecessary expenses for taxpayers.

Both Google and Microsoft evidently saw the Interior Department deal as a springboard to more federal government contracts. That's because the Interior Department is among the largest federal agencies to decide its e-mail should run on servers off its own premises -- a concept known as "cloud computing" that is being promoted as a less expensive and more convenient way to use software programs.

Microsoft CEO Steve Ballmer thought the contract was important enough to meet with two top Interior Department officials in February 2010 to try to win the deal, according to court records. Two days after that meeting, Ballmer sent an e-mail to Interior Department Deputy Secretary David Hayes describing their deal as a "first" for a federal government agency. The breakthrough, Ballmer wrote, "should be celebrated appropriately."

After it began to hear that Microsoft already had the inside track on the contract, Google began contacting the Interior Department to express its concerns that it wasn't being given a fair shake. The perceived bias became even more irritating to Google after the federal government certified Google's software security measures were adequate..

Although it conceivably could use a different formula for a government contract, Google sells a suite of software services that include e-mail for $50 per person annually. Based on that figure, Google would charge about $21 million during a five-year period to provide e-mail and other programs to the Interior Department's projected 85,000 users.