WASHINGTON — The Justice Department said Thursday that it would continue to use private, for-profit prisons to house thousands of federal inmates, scrapping an Obama administration plan to phase them out because of problems.

It was the second time in two days that the Trump administration reversed an Obama-era policy. On Wednesday, it rescinded a directive that gave anti-discrimination protection to transgender students and allowed them to use the bathroom of their choice.

In a memo released on Thursday, Attorney General Jeff Sessions directed federal prison officials to keep using the private prisons. He also withdrew a policy set out last August by Sally Q. Yates, then the deputy attorney general, who had ordered prison officials to phase out the use of the private facilities.