Japan could ask the International Court of Justice to settle a bitter row with South Korea over a disputed island group, Foreign Minister Koichiro Gemba said on Saturday.
It comes a day after South Korean President Lee Myung-Bak made a surprise visit to the islands, known as Takeshima in Japanese and Dokdo in Korean, in the Sea of Japan (East Sea).
"We must consider measures to peacefully resolve the dispute based on international law, including filing a suit with the International Court of Justice," Gemba told reporters.
"We would like to take the step in the not-too-distant future. Until now, the Japanese government has considered what impact such action may have on Japan-South Korea ties," Gemba said.
"But the president's visit to Takeshima made such considerations unnecessary. We must present Japan's position to the international community."
Gemba made the remarks after meeting Japan's ambassador to South Korea, Masatoshi Muto, who was recalled to Tokyo after Lee's trip to the islands, which lie at the centre of a decades-long dispute.
Many Koreans resent Japan's brutal colonisation from 1910 to 1945. Historical disputes continue to mar relationship, despite close economic ties and shared concerns over North Korea's missile and nuclear programmes.
Lee toured the Seoul-controlled islands Friday and shook hands with coastguards as a South Korean flag fluttered in the breeze, disregarding Tokyo's warnings that the visit would strain already prickly relations.
Prime Minister Yoshihiko Noda said the trip was "extremely deplorable".
Hours after Lee's visit, the glass front door at a South Korean consulate general's office in Hiroshima was shattered by a brick.
Police guarding the building heard the sound of shattering glass around 2:50 am Saturday, and saw a motorcycle speed away, national broadcaster NHK said, adding that police suspect it was linked to Lee's trip.
Japan may find it difficult to bring the island issue to the court, which requires an agreement between the disputing parties to make its ruling binding.
South Korea rejected repeated proposals by Japan in the 1950s and 60s to let the court rule on the issue.