BOSTON -- Gov. Charlie Baker will sign a bill raising fees on car rentals in order to pay for municipal police training.

Baker said on the campaign trail when he was running for governor that he would not raise fees. But Baker also supports law enforcement.

Baker told reporters Monday that he made his own proposal to raise $8 million for the Municipal Police Training Committee through the general fund, without raising fees or creating a new revenue source. But the Legislature rejected that and instead proposed the new $2 fee on car rentals.

Baker said coming on the heels of recent police killings - Weymouth Officer Michael Chesna and Yarmouth Officer Sean Gannon were both killed in the line of duty this year - law enforcement officials said getting more money for police training was "a very high priority for them."

"Within the context of a political process where we have a real urgency amongst our folks in law enforcement about this, I think our view is we should go ahead and accept the Legislature's version as they submitted it, even though I'd prefer not to raise fees," Baker said.

The bill passed by the Legislature would let the Municipal Police Training Committee collect up to $10 million a year from the new car rental fee. Any money raised above that would go into the state's general fund.

The Municipal Police Training Committee could also collect money from marijuana revenues, private sources and other legislative appropriations.

The committee is responsible for training and setting training standards for local police, University of Massachusetts police and state environmental police.

The bill passed the House by a vote of 149-4 and the Senate, 36-0.