The threat of North Korea has brought together two distant allies of the U.S. South Korea and Japan have signed an agreement, along with the U.S., allowing each nation's defense ministries to share information on the Hermit Kingdom through the U.S. Department of Defense.

A statement from the Defense Department explains that the trilateral agreement was signed on Monday between the three nations, and it pertains to information on North Korea's nuclear and missile capabilities.

"This arrangement creates a framework by which the defense authorities of the United States, the Republic of Korea, and Japan may voluntarily share classified information. The Department of Defense is to serve as the hub for information shared trilaterally," the statement says.

Without any legal obligations, the agreement will strengthen each country's security.

"... in particular, information sharing among the signatories on the nuclear and missile threats posed by North Korea will allow for a more effective response to future provocations and during contingencies," the statement explains.

The agreement itself details how the U.S. would act as a middleman between the two nations. If one nation wants to pass information, it goes through the U.S., who relays the information to the other country.

The agreement is momentous in that it has brought South Korea and Japan closer, two countries with a contentious history, especially considering World War II, going back almost a century, according to the New York Times. Both nations attempted a similar deal previously, but it fell apart because of popular opposition in South Korea.

"For Japan, the United States and Korea, how to deal with the threat of North Korean nuclear weapons and missiles is a shared security concern," said Japan's defense minister, Gen Nakatani. "This memorandum of understanding is meaningful because it improves the national security of the three nations."

The move comes just days after South Korea agreed to resume talks with North Korea, especially in the hopes of reuniting families.