Nonresident foreigners in Japan committed 12,238 crimes between January and June, down 18.2 percent from the same period last year, the National Police Agency said Thursday.

But the number of heinous crimes, such as murder and robbery, rose 13.2 percent to 137.

During the half-year period, 6,585 nonresident foreigners were arrested or detained, up 12.9 percent.

Of them, 48 percent were Chinese, 10.1 percent South Korean and 9.5 percent Brazilian.

While cases involving violations of the Criminal Code fell 12.9 percent to 7,972, the number of people arrested or detained in such cases grew 8 percent to 3,218.

Murder, robbery, arson, rape and abduction are categorized as heinous crimes. There were 104 robberies involving nonresidents, up 28.4 percent, and 19 murders, down 9.5 percent. Japanese were among victims in 82.6 percent of the robberies.

"The robberies have become organized and violent," an NPA official said. "They used to steal from compatriots, but the victims are mainly Japanese now."

The figures also indicate that crime by nonresident foreigners is spreading to more rural areas, according to the agency, with arrests and detentions surging 2.2 times to 108 cases in Hokkaido and more than doubling to 743 cases in Kyushu.

Robbery cases dropped 34 percent, but arrests and detentions related to car theft jumped 39.5 percent.

Because many stolen vehicles are later found overseas, the NPA said it suspects organized smuggling rings are involved.