When the Mayans envisioned the world coming to an end in 2012 — at least in the Hollywood telling — they didn’t count junk bonds among the perils that would lead to worldwide disaster.

Maybe they should have, because 2012 also is the beginning of a three-year period in which more than $700 billion in risky, high-yield corporate debt begins to come due, an extraordinary surge that some analysts fear could overload the debt markets.

With huge bills about to hit corporations and the federal government around the same time, the worry is that some companies will have trouble getting new loans, spurring defaults and a wave of bankruptcies.

The United States government alone will need to borrow nearly $2 trillion in 2012, to bridge the projected budget deficit for that year and to refinance existing debt.