Even the country’s richest university has to borrow money sometimes.

Bringing its total debt to just over $6 billion, Harvard began selling $400 million in tax-exempt bonds Tuesday to raise funds for a new law school building, refinance part of its existing debt and pay off other debt, according to a report by Bloomberg. (Yale offered $1 billion in bonds for similar reasons back in November.)

Moody’s Investors Service and Standard & Poor’s have given the bonds a top rating, even though Harvard’s endowment lost 30 percent of its value last year. The university also had to pay about $1 billion to various banks to escape financing contracts for its ambitious expansion plans — which are now considerably less ambitious.

Before last year, the university planned to spend about $1 billion a year on construction projects, including a campus expansion across the Charles River into nearby Allston. Harvard president Drew Faust announced in December that the university was suspending work on a large new science center in Allston.

In the documents for today’s bond sale, Harvard officials also disclosed that the university — along with 39 other colleges and universities — is being audited by the IRS, which wants to review Harvard’s nonprofit status.