China's leading search engine, Baidu Inc, can sue its U.S.-based domain name service provider, Register.com Inc, for breach of contract, gross negligence and recklessness related to an attack by hackers, a U.S. judge ruled on Thursday.

The order in federal court in New York allows Baidu to proceed with a lawsuit it filed in January.

The January 11 attack prevented Internet users around the world from gaining access to Baidu for five hours and disrupted its operations for two days, according to the lawsuit. Baidu holds the greatest share of the Chinese online search market.

Hackers calling themselves the Iranian Cyber Army hijacked Baidu's home page by gaining unauthorized access to Baidu's account at Register. Weeks before, the same hackers had claimed to do the same thing to popular microblogging site Twitter.

Baidu alleged that a Register.com service representative allowed an intruder, who falsely claimed to be an agent of Baidu, access to Baidu's account even though the intruder provided non-matching security codes.

If these allegations are proven, then Register failed to follow its own security protocols and essentially handed over control of Baidu's account to an unauthorized intruder, who engaged in cyber vandalism, the written opinion by Judge Denny Chin said in part. On these facts, a jury surely could find that Register acted in a grossly negligent and reckless manner.

Representatives for Baidu were not answering phones after business hours in China. A representative for Register.com in New York could not immediately be reached to comment.

Baidu's lawsuit made seven claims against Register.com over the security breach, but the judge dismissed five claims, including trademark infringement and aiding and abetting trespass.

Baidu has been steadily expanding its market base since Google Inc threatened to leave China over censorship and hacking concerns.

Baidu shares were trading up 1.1 percent at $74.12 in afternoon dealings.

The case is Baidu Inc v Register.Com Inc, U.S. District Court for the Southern District of New York, No. 10-444.

(Reporting by Grant McCool; Editing by Derek Caney and Gerald E. McCormick)