Holding defendants in jail because they can't afford to make bail is unconstitutional, the Justice Department said in a court filing late Thursday — the first time the government has taken such a position before a federal appeals court, NBC News reported.

It's the latest step by the Obama administration in encouraging state courts to move away from imposing fixed cash bail amounts and jailing those who can't pay.

"Bail practices that incarcerate indigent individuals before trial solely because of their inability to pay for their release violate the Fourteenth Amendment," the Justice Department said in a friend of court brief, citing the Constitution's guarantee of equal protection.

Read More