The number of homicides and other violent crime dropped in 2018, marking the second year in a row of such a decrease, according to FBI data released Monday.

Violent crime was down 3.3 percent in 2018 compared with the prior year, fueled by a 6.2 percent decrease in homicides and a 12 percent drop in robberies, according to the data. Property crime also fell 6.3 percent — the 16th consecutive year that the bureau recorded a decrease in such offenses.

Increases in violence in 2015 and 2016 had prompted fear among some law enforcement officials that the era of consistently declining crime was over. At his inauguration in 2017, President Trump painted a bleak picture of the country, saying gangs and drugs had “stolen too many lives and robbed our country of so much unrealized potential.”

“This American carnage stops right here and stops right now,” he added.

Trump’s first attorney general, Jeff Sessions, talked frequently of a violent crime wave sweeping the nation and advocated a return to hard-line policing and prosecution to stem it. In one of his most significant acts as the country’s top law enforcement official, Sessions directed federal prosecutors to seek the most serious charges they could, undoing Obama administration guidance to avoid charging certain defendants with offenses that would automatically trigger mandatory minimum sentences.

The move drew condemnation from civil rights groups, Republican lawmakers and even the conservative Koch brothers. It also seemed to go against the trend toward criminal justice reform that de-emphasizes mandatory minimum penalties for low-level drug offenders.

Even in 2015 and 2016, crime remained at historical lows. Experts warned against over-interpreting the data, particularly because the increases were not universal. Some places registered declines.

In 2018, according to the new data, 1,206,836 violent crimes occurred, compared with 1,247,321 in 2017. Homicides, robberies and aggravated assaults all registered year-over-year decreases, although the number of rapes rose 2.7 percent, according to the data.

Burglaries fell 11.9 percent, larceny thefts decreased 5.4 percent and motor vehicle thefts were down 3.1 percent, according to the data.