A TOKYO schoolyard is an unlikely venue to find North Korea’s red star fluttering in the wind. Children inside the Tokyo Korean Middle and High School study textbooks in Korean beneath portraits of Kim Il Sung and Kim Jong Il. When classes end, the girls shed their traditional jeogori dresses for anonymous teenage clothes and blend back into the city.

This school and around 70 more like it in Japan are an unusual legacy of Japan’s difficult relationship with Korea. Large numbers of Koreans came or were brought to Japan during the Japanese occupation of the Korean peninsula between 1905 and 1945. At the end of the second world war, about 700,000 of them stayed on rather than return to their homeland, which was by then sliding into the Korean war that would split the country into two bitterly opposed states. They were stateless for 20 years until 1965 when Japan recognised South Korea, at which point Koreans in Japan could become South Korean. Those who didn’t became North Korean by default and went to North Korean schools. The schools are an accident of history, often more about continuing a connection to the homeland than about ideological indoctrination.

Students in the North Korean schools do, however, learn that some of their ancestors were brought to Japan as wartime slave labour, and that it was Washington and its “puppet” ally in Seoul that started the Korean war. For years, Japanese critics have seen the institutions as the enemy within and fought to have them closed. Now, it looks as if that could happen.

Japan’s government excluded the schools from a scheme to waive tuition fees in other schools two years ago. Shinzo Abe, the prime minister, is now focusing on public funding. Tokyo has led the way, ending its 6m yen ($63,000) annual subsidy to this Korean high school. Local authorities around Japan are following suit. “We’ll survive, but many won’t,” laments the headmaster, Shin Gil-ung.

The funding assault is part of what may be the end-game in a low-level war between Japanese conservatives and the General Association of Korean Residents in Japan, known as Chongryon. The organisation, which runs the schools, is North Korea’s de facto embassy and is suspected of involvement in the North’s bizarre abduction of over a dozen Japanese citizens in the 1970s and 1980s. The Japanese want the surviving citizens returned. The North Koreans say they are all dead.

Since failed attempts at normalising ties in 2002 and 2004, and a string of nuclear tests by North Korea, relations have turned toxic once again. The association’s headquarters in central Tokyo has been seized by the government-backed Resolution and Collection Corporation in an attempt to collect outstanding loans of nearly 63 billion yen. A private attempt this month by a Buddhist temple to buy the headquarters failed, amid allegations of government pressure.

The schools and the community they serve are in deep trouble anyway. Thousands of Koreans are abandoning their ethnic identities to take Japanese citizenship. Enrolment at Mr Shin’s school has fallen to 600 students from a high of 2,300 when he attended in the late 1960s. Parents pay for 80% of the institution’s costs; cash from North Korea, once a lifeline, has dried up.

Ethnic Koreans in Japan, who have grown up in a society that distrusts them, struggle with profound identity issues, says Sonia Ryang, a graduate of a North Korean school in Japan, and now a professor of anthropology at the University of Iowa. Many dislike the regime in Pyongyang but remain loyal out of respect for their parents or the desire to preserve their heritage.

The education minister, Hakubun Shimomura, said recently that, given the lack of progress on the abduction issue, people “will not understand” continued public funding for such schools. Ms Ryang is blunter about their future: “If you were to just leave Chongryon alone, it will die off in three years.”