In recent weeks Tanaka’s long-simmering dispute with career Foreign Ministry bureaucrats has flamed into open warfare, undermining not only her prospects at the ministry but her boss’s ambitious reform agenda. She has failed in a bid to dismiss key ministry personnel, accused an aide of stealing one of her rings and quarreled with a ministry colleague over who would attend an imperial garden party. Last week, in a virtual no-confidence vote, the Diet rejected Tanaka’s request to attend this week’s United Nations General Assembly meeting in New York. “They’re digging holes and placing land mines in front of me,” the 57-year-old foreign minister told her hometown supporters recently. If she doesn’t tread more carefully, the real casualty may be Koizumi, who can ill afford to hand his old-guard opponents such a high-profile issue.

The struggle between Tanaka and her underlings has little to do with diplomacy. Her performance on the world stage has been tentative but harmless. The real issue is her heavy-handed attempts to reform a corrupt ministry run by a powerful old boys’ network. Entrenched bureaucrats have blocked her moves to transfer senior staffers and nominate ambassadors. To sabotage further reforms, diplomats inside the normally tight-lipped ministry leaked anecdotes accusing Tanaka of being prone to temper tantrums and panic attacks. In one case, they alleged that she had released top-secret information pertaining to the location of senior U.S. officials following the September 11 terrorist attacks in New York and Washington. The badmouthing “has verged on harassment and intimidation,” says Takashi Inoguchi, a political scientist at Tokyo University.

Tanaka’s tribulations are part and parcel of the larger battle that the pro-reform prime minister is waging. Tanaka and Koizumi share similar pedigrees: both are outspoken Liberal Democratic Party renegades with long records of criticizing the party’s status quo center. Swept to power in a grass-roots backlash against the LDP mainstream in April, they remain hugely popular with Japanese voters. Yet translating “people power” to political muscle has proved difficult for both. Tanaka’s shrill broadsides against the bureaucracy, combined with her lack of foreign-policy expertise, have “confused the issue of trying to get control over the bureaucracy with simply being nasty,” says Columbia University’s Japan watcher Gerald Curtis. “Unfortunately she’s given her enemies lots of ammunition to attack her with.”

Struggles between politicians and bureaucrats have shaped Japanese governments for centuries. Samurai sometimes detained local lords to prevent them from “meddling” in state affairs. After the Meiji Restoration, noblemen led by Baron Aritomo Yamagata undermined elections with a law that barred politicians from making personnel appointments in ministries. The rules turned government into a collection of rogue power centers that followed self-serving agendas. In postwar Japan, democracy has served as a fig leaf to mask a similar system. Bureaucrats loyal to the ruling LDP control key ministries, while political appointees are mere figureheads.

Like Koizumi, Tanaka entered office with the goal of cleaning house. Initially the ministry looked like a fat, scandal-ravaged target. In January a 55-year-old diplomat was accused of embezzling about $4 million to buy an apartment, a golf club membership and as many as 15 racehorses. He later confessed to pilfering from a fund intended for overseas travel. In July two diplomats were arrested for allegedly padding limousine expenses during the G8 summit in Okinawa last year, and around the same time Japan’s consul general in Colorado was relieved of his post after allegedly misusing ministry funds. The cases validated Tanaka’s crusade for transparency. “She’s done something male ministers couldn’t have,” says fellow female Diet member Mizuho Fukushima, secretary-general of the Social Democratic Party. “She has brought the ministry’s problems, such as its use of classified government funds, out in the open.”

The backlash, though, has been swift. Bureaucrats rallied to resist Tanaka’s efforts to install her own people in the ministry. Although she was able to make numerous low-level changes, she has had conflicts with her vice foreign minister and been prevented from ousting the head of the personnel division–the key player in ministry staffing. Tanaka’s opponents used their political connections with the LDP’s old guard to force Koizumi to veto her plans. In June he signaled his frustration with the infighting, telling reporters that he had asked Tanaka to “concentrate on foreign policy.”

Sensing the advantage, bureaucrats have pressed a campaign of leaks crafted to undermine Tanaka’s credibility. Theme one: she’s too emotional–a claim buttressed by anecdotes alleging screaming tirades and temper tantrums. Theme two: she’s mentally unstable, as exhibited by her alleged accusation that ministry underlings are spies and thieves. Theme three: her imperious demeanor ill suits diplomacy. The evidence: an episode in which Tanaka attempted to transfer the head of the ministry’s powerful personnel section by storming into the section’s office, locking the door and castigating a female subordinate when she refused to write a letter announcing her boss’s dismissal.

The incident, which took place on Oct. 29, could prove a fatal mistake. The mass-circulation Yomiuri Shimbun and several other major dailies have since called for Tanaka’s resignation. “It has been reported that the real reason Tanaka had a bee in her bonnet was that she had not been informed about a garden party to be hosted by the emperor and empress,” read the Yomiuri’s Nov. 1 editorial. “Apparently, she had hoped that her supporters would be invited to the party and was furious that they were not.” The editorial also cited Tanaka’s marginalized foreign-policy role, noting (as have many critics) that “her words and deeds reflect a lack of insight into diplomacy.”

The ongoing brouhaha has Koizumi in an extremely tight spot, which may be the point. The LDP mainstream is using the issue to pressure him to jettison Tanaka and reshuffle his cabinet. Yet the risks of doing so are twofold. Dumping her could, by some estimates, shave 20 points off Koizumi’s 70 percent approval rating. And it would undoubtedly embolden anti-reform elements inside the LDP to attack cabinet ministers who are trying to remake other ministries. Then there’s the obachan (auntie) vote. Tanaka, even now, is arguably Japan’s most popular politician, and her core constituency is female. “It looks to me like the mass media are really bashing her,” says a typical 26-year-old woman, adding: “There is a lot of hidden jealousy among men.” What the old boys are really after, though, is not her head but the prime minister’s.