SEOUL, South Korea — Japan and South Korea on Monday pledged for the first time to share military intelligence about North Korean weapons programs, in a three-way pact with the United States that Washington hopes will improve cooperation between its mutually estranged Asian allies.

Defense analysts called the agreement a small but symbolic breakthrough because it brought together Japan and South Korea, two prosperous democracies that have been divided by disputes over history and territory. The difficulties of bridging their differences were evident in the narrow scope of the pact, which was not a legally binding treaty but a memorandum of understanding.

Under the pact, the sharing of classified information will be limited to North Korea’s missile and nuclear weapons programs. In addition, Japan and South Korea will share that intelligence not directly, but via the United States.

Still, analysts said the fact that the memorandum was signed at all represented a possible warming of the relations between the two nations. They said that while Japan had always been more open to signing such an agreement, South Korea had to overcome deep distrust about Japan to sign the deal.