Of the 5,423 foreigners arrested last year for committing crimes, more than 90 percent of them were living in the country legally, while illegal immigrants accounted for just 5.9 percent of the cases, unlike in the past, according to government white paper on crime released Friday.

As of January, visa overstayers taken into custody had fallen to 62,009, the lowest figure in two decades. The government attributed the decline to tightened scrutiny at immigration points and Japan’s prolonged economic doldrums that served as a disincentive to stay in the country.

Even the 5,423 foreigners arrested in 2012 reflected a decline for an eighth straight year. Of them, those on long-term resident visas accounted for 23.1 percent, followed by spouses of Japanese at 20.1 percent and exchange students at 15.7 percent.

Theft was by far the most common crime committed, at 71.5 percent, and assaults accounted for 7.5 percent of the arrests.

The Justice Ministry’s Research and Training Institute, which compiled the paper, also conducted a special investigation in 2011 into the situation of foreign inmates nationwide, during which it surveyed 671 prisoners.

Of them, 45 percent were found to have committed crimes while living in Japan legally, including long-term residents (17.4 percent), permanent residents (13.9 percent) and spouses of Japanese (11.5 percent). Those caught as illegal immigrants, which is itself a crime, accounted for 32 percent.

The situation is in sharp contrast to 2000, when approximately 10 percent of the entire foreign inmate population had legal resident status, while about two-thirds of the total incarcerated had been arrested as illegal immigrants.

The institute looked into the situation of 103 juvenile foreign offenders as well between June and November 2010, and found that 95 of them were living in the country legally.

Of them, Brazilians topped the list at 33, followed by Filipinos at 25 and 12 Peruvians and 12 Chinese. More than half of them were either born in Japan or were brought to the country as infants or young children.

It was also revealed that 12 of the juvenile offenders polled had not even graduated from junior high school, which is compulsory. There were also youths who didn’t finish grade school. No such situation was seen among their Japanese counterparts.

The finding suggests a lack of education is behind foreign minors’ tendency toward delinquency, posing the “need for juvenile centers to beef up their educational efforts,” the report said.

While more than 80 of the young offenders were capable of speaking Japanese at a satisfactory level when they were institutionalized, the research found that fewer than a third of their parents had the same level of fluency.

After theft, armed robbery was the second-most committed crime — at 25.2 percent — compared with 4.9 percent among juvenile Japanese offenders.

The paper also revealed the total number of criminal offenses in 2012 hit a new low of 2.01 million cases, 5.8 percent down from the previous year’s.

Meanwhile, out of 287,021 offenders arrested, 130,077 turned out to be repeat offenders, pushing the recidivism rate up to 45.3 percent, the highest in more than two decades.

In another worrying trend, the number of female inmates more than doubled to 2,225 nationwide over the past two decades, with 79 percent of them convicted of either drug offenses or theft.