How did the federal deficit get so big, and how will Congress deal with it this time? Here's a guide to understanding the federal deficit in less than two minutes. (The Washington Post)

Treasury Secretary Jack Lew warned congressional leaders Wednesday that he will exhaust emergency borrowing measures “no later than Oct. 17,” leaving him with less than $30 billion on hand to pay the nation’s bills.

In a letter sent to all members of Congress, Lew urged immediate action to raise the federal debt limit, which stands at $16.7 trillion. Without additional borrowing authority, Lew warned, cash on hand “would be far short of net expenditures on certain days, which can be as high as $60 billion.”

“If we have insufficient cash on hand,” the letter said, “it would be impossible for the United States of America to meet all of its obligations for the first time in our history.”

The letter comes a week after Treasury closed the books on the most recent round of quarterly corporate and individual income tax receipts, which Lew previously warned were running a bit behind expectations. It marks the first time Lew has given lawmakers a hard deadline for raising the debt limit; he had previously said he would exhaust emergency borrowing measures in “mid-October.”

Lew also cautioned that a move by House Republicans to order Treasury to “prioritize” its payments in the event it ran short of funds “would not protect the full faith and credit of the United States” because “any plan to prioritize some payments over others is simply default by another name.”

Since 1980, the debt ceiling has been raised 42 times.

“The United States should never have to choose, for example, whether to pay Social Security to seniors, pay benefits to our veterans, or make payments to state and local jurisdictions and health care providers under Medicare and Medicaid. There is no way of knowing the damage any prioritization plan would have on our economy and financial markets. It would represent an irresponsible retreat from a core American value: We are a nation that honors all of its commitments,” the letter said.

The Oct. 17 deadline comes about two weeks earlier than some independent analysts had predicted. Nancy Vanden Houten, an analyst at Stone McCarthy, said that while she does not have as much information as Treasury, she sees no reason why Treasury would run out of money before Nov. 1, when large payments are due to Social Security recipients, Medicare providers and active-duty service members.

“I don’t want to say the Treasury secretary is bluffing and if I were in his shoes, I would want to err on the conservative side,” she said in an interview. “But their cash balance estimates seem a little bit conservative to me and I still see them being able to squeak through the second half of October.”

But Oct. 17 has other significance: Treasury officials have announced plans to roll over $120 billion in debt that day, seeking to replace existing debt with new borrowing. Without a higher debt limit, bond investors could be spooked and either fail to show up to buy Treasury debt or demand higher interest rates.

“That’s a scenario that’s impossible to predict,” Vanden Houten wrote in a report this week. During the last big debt limit fight, “in 2011, investors— somewhat perversely— still saw the Treasury market as a safe haven during the turmoil caused by Congress’s failure to raise the debt limit.”

Zachary A. Goldfarb contributed to this report.