The Treasury Department has been rapidly spending its large cash reserves ever since President Trump took office, a move that complies with federal law, but could also make it harder for the government to stay under the debt ceiling once the limit kicks in again later this month.

On Jan. 20, the day Trump took office, the federal government had $382 billion in cash on hand. As of Thursday, that was down to about $109 billion.

Spending all that cash has helped keep the total national debt under $20 trillion. The total debt has hovered around $19.9 trillion since Trump took office, and would easily exceed $20 trillion by now if the government borrowed money to fund government spending instead of using available cash.

But staying under the dubious milestone is probably not why all that cash is going out the door. Tyler Evilsizer of the Committee for a Responsible Federal Budget told the Washington Examiner there's another reason: keeping a low cash balance is required under a law that was passed in 2015.

"The last debt ceiling legislation prohibited Treasury from increasing the cash balance above normal operating balances right before the debt ceiling returns," he said.

Specifically, Congress passed legislation in late 2015 that suspended the debt ceiling through March 15, 2017. Until that date, the government can borrow whatever it needs to keep funding itself at levels approved by Congress.

Starting March 16, the debt ceiling will be in effect again, and it will be whatever level of debt the government has racked up.

In past years when this has happened, the Obama administration was able to keep the government at current funding levels for several months, in part by limiting borrowing, and in part by using any cash it had to keep things running.

But in the 2015 law, Congress expressly prohibited the government from building up a huge arsenal of cash in order to survive when the debt ceiling was reached.

"The Secretary of the Treasury shall not issue obligations during the period specified in section 901(a) for the purpose of increasing the cash balance above normal operating balances in anticipation of the expiration of such period," the law said.

Evilsizer said the nearly $400 billion Treasury had at the start of the Trump administration was relatively high. But he said the recent decline actually puts in back in the range of cash levels normally seen.

The Treasury Department did not return requests for comment about its decision to reduce its cash holdings.