In an unprecedented ruling, a Japanese court says the prime minister's visits to a war-related shrine are not constitutional. But, the Japanese leader is vowing to defy the court decision.

Prime Minister Junichiro Koizumi told reporters Wednesday he will continue to pay his respects at the controversial Yasukuni Shrine, saying he does not understand why the visits are not constitutional.

Japanese Deputy Chief Cabinet Secretary Hiroyuki Hosoda says the district court's verdict is extremely regrettable. He adds the government will study the court ruling and make a decision whether to appeal.

Earlier in the day, the court in southern Japan ruled in favor of 211 plaintiffs who claimed Mr. Koizumi's visits violate Japanese constitutional separation of religion and state.

In their lawsuit, the plaintiffs said Mr. Koizumi visited the shrine accompanied by his secretaries, used an official car, and signed the visitors' book as the prime minister, clearly violating the constitution.

Mr. Koizumi says he makes the visits in both a private and public capacity to renew his resolve to create a world free of war.

The main opposition Democratic Party has asked the prime minister to stop visiting the shrine in a public capacity.

Mr. Koizumi has paid his respects at the Tokyo Shinto shrine every year since 2001, most recently on New Year's Day.

The visits anger Japan's Asian neighbors. China and other nations, which suffered under Japanese imperialism in the early 20th century, contend the visits glorify Japan's past militarism.

South Korean officials praise the court's decision but say they doubt it will halt the controversial visits.

The Fukuoka district court, in the decision announced Wednesday, agreed with the plaintiffs' constitutional arguments but rejected their request for compensation of about $1,000 each.

Decisions in five similar lawsuits in other district courts are pending.