A federal judge struck down a challenge to the Education Department's overhaul of the collection of student loans.

A federal judge on Wednesday cleared the way for the Education Department to stop using private debt collectors and revamp the way it handles overdue student loans.

Instead of having private collection agencies solely dedicated to recouping past-due education loans, the department wants to fold those duties into student loan servicing as part of a broader overhaul called the Next Generation Financial Services Environment, or NextGen. Bundling those functions would require companies competing for the business to provide a wide array of services or team up with other firms.

Neither option is appealing to private debt collectors, who argue that the Education Department arbitrarily restricted competition and illegally canceled a contract solicitation they were vying to win. Last year, the courts barred the department from canceling the collection contract. But when the agency issued three new solicitations for loan servicers that included default collection duties, a group of debt collectors filed another lawsuit to block the NextGen request for proposals.

On Wednesday, U.S. Court of Federal Claims Judge Thomas C. Wheeler said the Education Department provided sufficient justification for consolidating loan servicing and default collection work. He said the department was within its right to cancel the collection contract solicitation in light of its rollout of NextGen.

Wheeler pushed back against the argument that NextGen would create irreparable harm for the debt collectors, noting that they can team up with other companies for a slice of the business. Still, he criticized the Education Department’s messy bid for new contractors to manage its $1.5 trillion portfolio of student loans.

“There is no such thing as a perfect procurement, and the Department of Education’s years-long series of student loan servicing and debt collection solicitations typifies the axiom. But a flawed procurement is not necessarily an illegal one,” Wheeler wrote in his ruling.

Attorneys for several of the private collection companies involved in the case said they are evaluating next steps. The Education Department did not immediately respond to requests for comment.

Wheeler’s ruling is rooted in the federal government’s attempt to whittle the number of contractors managing overdue education debt. Companies that lost out on a 2016 debt collection contract protested the decision to the Government Accountability Office, which faulted the Education Department for mismanaging some bids.

A few firms filed complaints with the federal claims court, leading authorities to put a hold on assigning new accounts to firms. A federal judge then directed the Education Department to complete its selection of debt collectors for the new contract. The agency tried to further reduce the number of contractors and selected just two: Windham Professionals; and Performant Financial, a company in which Education Secretary Betsy DeVos invested before becoming secretary.

The winners beat out nearly 40 other bidders for contracts valued at as much as $400 million for each company. Several losing firms took legal action, with some questioning the selection of Performant, because of its lackluster track record with the Education Department.

Attorneys for the Education Department in May 2018 notified the courts of the agency’s plan to rescind the contracts it awarded to Windham and Performant, because of its new strategy for handling late loan payments.

The Education Department has come under fire for the use of private collection agencies. Liberal lawmakers and advocacy groups say the companies stop at nothing to pursue debts, without providing borrowers sustainable solutions for managing their loans. Many have denounced the existing system as exceedingly expensive.

Collection industry groups contend that private debt collectors play a critical role in recouping taxpayer money and do so within parameters of the law.

Earlier this year, a dozen congressional Democrats sent a letter urging DeVos to reconsider the use of the collection firms, because of the excessive cost to taxpayers and concerns about their effectiveness. Collection costs, the lawmakers argued, consume about 20 cents of every dollar borrowers pay, regardless of whether the costs charged by those companies comes close to the actual cost borne by the debt collector.

According to an analysis by the Center for American Progress, a liberal think tank, the federal government spent about $700 million in 2017 on debt collection for fewer than 7 million borrowers in default — nearly the same amount it spent on loan servicing for more than 33 million people paying down their debt.