For the first time in seven years, the state has ended its fiscal year in the black. 

Controller John Chiang says revenues, as of June 30, topped spending by enough to pay off outstanding loans and still leave a balance of just about $2 billion.

All in all, it's "terrific news, it's nice to be cash positive," Chiang said. 

There will still be some borrowing going forward to address cash flow needs, and Chiang does caution the balance could be easily erased by a bad business cycle.

It's not a question of if we'll see one, but when and how deep it will be, Chiang said. 

"What is the severity of the downturn?" he said. 

Total revenue for the 2013-14 fiscal year came in at $101.6 billion, about $2.1 percent higher than Governor Jerry Brown projected back in January.