The number of people in Japan overstaying their visas in the beginning of January rose year on year for the first time in more than two decades, the Justice Ministry reported Friday, blaming a spike in visitors from Thailand and Vietnam.

As of Jan. 1, there were 60,007 violators in Japan, up 1.6 percent from a year ago, the ministry said.

By nationality, Thailand ranked third overall at 5,277, trailing Koreans at 13,634 and Chinese at 8,647.

The number of Thai violators, however, surged 20.2 percent in 2014 while Vietnamese violators jumped by 66.8 percent.

Many Thais were caught overstaying after entering on a visa waver program for short-term visitors. Japan instituted the waiver in July 2013 under an initiative by Prime Minister Shinzo Abe to make Japan a "tourism-driven" nation.

The result, according to a Justice Ministry official, was a 48 percent surge in tourists and other short-term visitors from Thailand to about 630,000 in 2014.

The official blamed the rise in the Vietnamese total to an increase in exchange students and foreign technical interns overstaying their visas.

For all nationalities combined, the number of overstaying violations peaked at 298,646 in 1993 before declining steadily until 2014, when the total fell below the 60,000 threshold.

The downward trend is apparently the result of a five-year crackdown on illegal immigration that started in 2004. The campaign's target was to halve the number of cases from the 219,418 logged that year.

Meanwhile, Japan had a total of 2.12 million foreign residents at the end of last year, up 2.7 percent from a year earlier, the Justice Ministry said.

This marked the second time that the number of long-term and permanent foreign residents has shown an uptick since the March 2011 Fukushima nuclear crisis, signaling that concerns about radiation contamination are waning.