THE curved roofs and pear orchards continue as you cross from Tottori prefecture on the west coast of Japan’s main island into neighbouring Hyogo just to the east. But something unseen changes. A voter on the Hyogo side has just a fraction of a Tottori resident’s political clout. Decades of post-war urban migration have left wide disparities in voting weights across Japan. After the coming election for the upper house of the Diet on July 21st, rural Tottori will have two councillors in the house to represent its 500,000-odd voters. Hyogo will have just four, despite having the big city of Kobe and over nine times as many voters.

Against their will, the prime minister, Shinzo Abe, and his Liberal Democratic Party (LDP) have had to deal with the matter. In 2011 the Supreme Court said the electoral map for the lower house of the Diet was in a “state of unconstitutionality” because it, in effect, disenfranchised so many. Still, political parties pressed ahead with the 2012 general election with the same map. Mr Abe vaguely promised to resolve the issue if his party won, and gambled that the courts would stop short of challenging the legislature. Voting disparities, after all, have dogged politics since the 1960s. The Supreme Court has never overturned an election because of them.

Yet in March, high courts across Japan shocked the country’s politicians by ruling the 2012 election, in which the LDP triumphed, to be unconstitutional. Two courts went so far as to declare the results invalid. Later this year, as Mr Abe’s government girds itself to legislate for economic reforms—the third part of “Abenomics”, as the prime minister’s programme of monetary loosening, fiscal stimulus and growth measures is known—the Supreme Court will rule on the lower courts’ decisions. If the court concurs with their censure, it will weaken the legitimacy of Mr Abe’s government at a critical moment. Should the Supreme Court take the extreme—though unlikely—step of ruling the 2012 election to be invalid, a constitutional and political crisis would follow.

Public awareness of voting disparities is rising as rural areas empty, putting pressure on the judiciary to act. Politicians are strongly attached to the system that elects them. The LDP in particular has flourished in the countryside. For most in the party, deliberately weakening its rural base and scope for patronage would be folly. MPs have counted on voting rules being too arcane for young voters to understand.

However, public perceptions are changing. Four years ago a prominent lawyer, Hidetoshi Masunaga, formed a citizens’ lobby group. By launching a series of lawsuits, it has pressed the judiciary into standing up to parliament over the issue. Business groups and foreign investors also complain of prefectural voting disparities as a factor holding back structural reform of Japan’s economy: rural folk are more averse to change than are city dwellers.

Locals are well aware of voting disparities. “We have lived with this unfairness for too long,” says Mitsuo Sugimoto, a 64-year-old tea trader from a village on the Hyogo coast, “and it is very wrong.” Residents of Tottori, on the other hand, know that their prefecture benefits from their relatively stronger voice in both houses of the Diet. Ever since Mr Abe’s fiscal stimulus kicked in this spring, central government money has been pouring into Tottori’s construction industry. But, says Yuko Nishimura, a young businesswoman with a husband in the building trade, “the Hyogo side is dead.”

Voting disparities are bound up with generational issues, for they adversely affect younger voters in Japan’s cities in favour of older rural residents. Of the 300 politicians in the lower house elected from single-member constituencies, says Robert Feldman of Morgan Stanley, an investment bank, Japan’s countryside sends 19 more members than it should. Under a method weighted purely by population, urban voters would choose the holders of all bar one of these seats instead.

The question now is what the highest court will do. Until very recently, says Taku Otsuka, an LDP politician who sits on a Diet committee on electoral law, the Supreme Court seemed likely to rule the 2012 election invalid. Thirty-two MPs would have to be summarily dismissed, including the foreign minister, Fumio Kishida, and other party bigwigs, if the court ordered how seats were to be reallocated. Should this happen, it would be impossible to pass legislation needed to implement Mr Abe’s promised structural reforms. But on June 24th the government passed a bill designed to head off such a crisis, by tweaking the electoral map. Still, Mr Abe’s strategy may not work, says Yasuo Hasebe, a constitutional scholar at the University of Tokyo. The tweaking is so slight—just five seats abolished—that the courts may later challenge it.

Meaningful electoral revision would clearly help Mr Abe implement his programme of Abenomics. The prime minister’s boldest step to date has been to sign up for talks to join the Trans-Pacific Partnership (TPP), a regional free-trade agreement. The strongest opposition to the TPP comes from over-represented farmers, who fear foreign competition, and from those LDP parliamentarians who derive support from them. It would also be easier to mend the public finances, another goal of Abenomics, if it were politically easier to propose a reduction in spending on pensions and medical care for the elderly, living disproportionately in the countryside. Late last month Mr Abe said he would create an independent commission of private-sector experts to decide on electoral reform. But this looks like a purely tactical move. Mr Abe’s choice to please his party rather than push for change is disappointing.

In the long run, the LDP’s senior politicians admit, the party must attend better to urban voters or risk losing ground to rivals such as Your Party, which appeals to city professionals. For now, however, the LDP has not broken its addiction to the solid backing from rural dwellers. Tottori’s farmers have voted squarely for the main LDP man, Shigeru Ishiba, secretary-general of the party, because he, like his father, who was once governor, has done a lot for the prefecture. Younger, more cosmopolitan politicians have far shallower roots.