Massachusetts raked in a record $27.8 billion in tax revenue in the fiscal year that ended last month, a whopping 8.6 percent increase over the previous year, according to preliminary numbers the state Department of Revenue announced Tuesday.

The windfall is both a sign of economic strength, and, experts say, a unique turn of events partially tied to the federal tax overhaul that President Trump pushed through last year.

“You have to give some credit where credit is due: A lot of this revenue is affiliated with federal tax reform in some way or another,” said Eileen McAnneny, president of the business-backed Massachusetts Taxpayers Foundation.


Some of the unexpected windfall came from capital gains taxes — levies paid on investment profits — and pre-payment of taxes. People may have cashed out some of their investments once they knew what the federal tax structure would look like. And others may have pre-paid taxes to avoid losing favorable federal tax deductions.

In any case, it’s not a sure thing that such a bonanza will recur for the state next year.

“Some of this money is one-time in nature, and we may not see a repeat performance,” McAnneny said.

Under state law, capital gains revenue above a certain threshold goes into the state’s rainy day fund. The revenue department announced Tuesday that the total transfer for the fiscal year that ended June 30 will be about a half-billion dollars, a substantial sum.

The fund is meant to be a final bulwark against extreme cuts to state services when the economy tanks.

Even after the deposit, there will be lots of money left over. Baker has proposed using the additional funds for school safety and the state’s Medicaid program, among other priorities.

The Legislature will likely have the final say on how the extra cash is spent.


Joshua Miller can be reached at joshua.miller@globe.com.