Standard & Poor's Thursday cut Gap Inc.'s credit ratings to junk status, saying the largest U.S. apparel retailer have suffered from disappointing earnings and sales in a weak economy and a "poor" retail environment.

The downgrade followed San Francisco-based Gap's announcement earlier Thursday that it obtained a $1.3 billion two-year secured bank credit facility. Companies with investment-grade ratings rarely need to obtain secured facilities.

S&P lowered Gap's long-term corporate credit rating three notches to "BB-plus," its highest junk grade, from "BBB-plus," and its short-term credit rating to "B," a junk grade, from "A-2." Its rating outlook is now stable.

"The downgrade is based on a protracted record of disappointing sales and earnings," S&P analyst Diane Shand said in a statement. "Management faces significant challenges in turning around the performance of each of its brands. No significant improvement in credit measures is likely to occur in the near term."

Gap runs more than 4,100 stores under the Gap, Banana Republic and Old Navy brands. Sales at stores open at least a year have fallen every month for nearly two years. The downgrades will raise Gap's borrowing costs.

Gap shares, off more than 50 percent in the last year, fell 33 cents to $13.01 on the New York Stock Exchange.