WASHINGTON — The Justice Department on Thursday settled a lawsuit against eBay that accused the company of anticompetitive practices in the recruitment and hiring of skilled employees.

The settlement resolved a 2012 lawsuit that accused eBay of having an agreement with the Intuit software company preventing each firm from recruiting the other’s employees. That deal, entered into by top-level executives, was designed to limit competition between the two firms for highly specialized technology employees and denied workers the chance for better, higher-paying job opportunities, the federal government said.

“The behavior was blatant and egregious. And the agreements were fully documented in company electronic communications,” Assistant Attorney General Bill Baer, head of the Justice Department’s Antitrust Division, said.

The settlement, which requires court approval, would bar eBay from entering into or enforcing any agreement that restricts the recruitment or hiring of employees for the next five years. The e-commerce company also agreed to pay $3.75 million to California as part of a similar settlement with that state’s attorney general’s office. Intuit is not a defendant in the case because it is already subject to a similar Justice Department consent decree.

Though it admitted no wrongdoing as part of the settlement, eBay said it still believes the policy that prompted this lawsuit was “acceptable and legal” and that any recruitment practices that raised concerns with the Justice Department ended several years ago.

In a written statement the company said “eBay competes aggressively to attract and retain the best talent, while conforming to the hiring practices standards established by the Department of Justice in prior hiring-related cases against other companies.”

The case against eBay grew out of a broader Justice Department investigation into claims that some of Silicon Valley’s biggest companies had entered into a secret pact forbidding them from recruiting each other’s employees.

That probe resulted in a 2010 settlement requiring Google, Apple, Intel, Adobe Systems, Intuit and Pixar to scrap their no-poaching agreements, which were common in Silicon Valley.

A class-action lawsuit representing more than 64,000 engineers, programmers and other technology companies subsequently was filed against all the companies involved in the original Justice Department investigation.