Fuel taxes in Massachusetts will increase, after lawmakers there overrode Democratic Gov. Deval Patrick’s veto of the state transportation budget.

The move will add 3 cents to the Bay State’s 21-cent-per-gallon tax on both diesel and gasoline, starting next Wednesday. Starting in 2015 the tax will also be indexed for inflation.

The hike is part of a $500 billion dollar infrastructure package, but Patrick wanted an $800 million package with a bigger increase in fuel taxes, saying the extra amount was needed to meet Massachusetts’ transportation needs. He was also pushing for plans to end tolls along the Massachusetts Turnpike, west of Route 128.

Both the Democratically controlled House and Senate voted overwhelming to override Patrick’s veto while many Republicans opposed any tax increases.

The tax hike also includes higher taxes in cigarettes along with computer software and computer services.