Violent crime rose in the United States in 2012 for the first time in six years, led by an increase in major crimes in large cities, according to preliminary data released Monday by the F.B.I.

The largest increases took place in cities with populations of between 500,000 and one million people, where violent crime rose by 3.7 percent, including a 12.5 percent spike in murder rates, according to the data.

The nation’s largest cities, those with more than one million people, also had upturns in violent crimes, though at more modest rates. The largest cities had a 1.4 percent increase in violent crime, including 1.5 percent for murders and 3.2 percent for rapes, according to the statistics.

Over all, the nation’s violent crime rate ticked up by 1.2 percent in 2012 after years of steep declines.