Massachusetts revenue officials said Thursday the state collected $96.8 million from the 21 cents per gallon tax during the months of March and April. That was a $200,000 increase from the same period a year ago.

Gas prices have climbed an average of more than 60 cents since the start of March and nearly a dollar since the beginning of the year, according to AAA Southern New England.

Revenue officials say the rate of increase in gas tax collections has slowed in recent months, suggesting that many residents have modified their driving habits.

The vast majority of gas tax revenues go to the state’s transportation fund.