LOS ANGELES - Immigration-related offenses are now the leading type of federal prosecution, constituting more than 40 percent of cases compared with 22 percent for drug crimes, according to federal crime data.

Many immigrants are now prosecuted because they try to cross the border again after being deported, according to a report released this week by Human Rights Watch. Often, they are so desperate to get back to their families in the United States that prison time is not a deterrent, the report said. In the past, people with no prior criminal record would have been deported without being prosecuted.

According to Tuesday's report, "Turning Migrants into Criminals," immigration prosecutions for illegal entry or reentry increased to more than 85,000 in 2013 from about 12,500 in 2002.

Until about a decade ago, most people prosecuted for immigration violations had criminal histories that included violent crimes or firearms offenses. Then federal prosecutors began taking more immigration cases in which the defendant had no prior convictions or a minor criminal record.

A misdemeanor conviction for illegal entry is now enough to trigger a felony prosecution if the person is caught trying to enter the country a second time.

Illegal entry is a misdemeanor punishable by as much as six months in prison. Illegal reentry has a maximum sentence of two years, but prior criminal convictions can raise the limit to as many as 20 years. The number of federal prisoners serving time for immigration violations has grown to 22,526 in March 2013 from slightly more than 10,000 in 1999.

Prosecution rates vary greatly across border regions. In Southern California, only 7 percent of prosecutions are immigration-related. In the South Texas district, more than half of prosecutions are for immigration violations. In New Mexico, more than 70 percent of federal prosecutions are for illegal entry or reentry.

Citing another study, Human Rights Watch researchers put the cost of incarcerating immigration violators at $1 billion in 2011. The costs include not only housing them in prisons but also money spent on prosecutors, public defenders and courts.

"I think what's really interesting is we're living in a time where state governments and state prison systems are saying, 'How can we reduce the number of nonviolent offenders? It doesn't make sense to lock people up that are not dangerous,' " said Grace Meng, the report's author. "In the immigration context, we're rushing blindly in the opposite direction."