Hewlett-Packard Co said on Monday it has agreed to settle a U.S. Justice Department probe into an alleged kickback scheme related to government technology contracts.

HP, the world's largest technology company by revenue, said it expects the settlement to reduce earnings for its fiscal third quarter by 2 cents a share.

In 2007, the Justice Department filed a complaint against HP, Sun Microsystems and Accenture, alleging millions of dollars in kickbacks and illegal rebates paid between technology partners working on government contracts dating back to the 1990s.

The complaint said HP breached its federal government contracts and submitted claims that were inflated by illicit fees and rebates.

The suit was originally filed in 2004 under the whistleblower provisions of the False Claims Act and was joined by the Justice Department in April 2007.

In 2007, IBM and PricewaterhouseCoopers agreed to pay a total of $5.2 million to settle allegations around the same case, which was originally filed by whistleblowers Norman Rille and Neal Roberts.

HP did not release any further details about the settlement, which has not yet been finalized.

HP denies engaging in any illegal conduct in connection with these matters. We believe it is in the best interest of our stakeholders to resolve the matter and move beyond this issue, a company spokeswoman said.

Shares of Palo Alto, California-based HP rose 6 cents in after-hours trade, after closing 3.3 percent higher at $47.56 in the regular session on the New York Stock Exchange.

(Reporting by Gabriel Madway; Editing by Tim Dobbyn and Steve Orlofsky)