The United States on Friday welcomed South Korea's decision to maintain a military intelligence-sharing pact with Japan just hours before the expiration deadline, calling it a move that "strengthens trilateral cooperation" in the face of regional security challenges.

"This decision sends a positive message that like-minded allies can work through bilateral disputes," a State Department spokesperson said in a statement, apparently referring to historical and trade disputes that have increasingly soured the relationship between Tokyo and Seoul.

"Given our shared regional and global challenges, decisions to strengthen trilateral cooperation are timely and critical," the statement said.

The United States had been calling for South Korea to revisit its announcement from August that it would not renew the General Security of Military Information Agreement, or GSOMIA, a pact seen by Washington as foundational to regional security and to counter North Korea's nuclear and missile threats.

GSOMIA has allowed Japan and South Korea, which have no military alliance between them, to directly share sensitive intelligence information.

Without the agreement, they would have needed to pass such information through the United States, their shared ally.

In a reversal of its earlier decision, South Korea said Friday that it has decided to conditionally maintain GSOMIA.

The U.S. spokesperson said that Washington "strongly believes that defense and security issues should remain separate from other areas" of the Japan-South Korea relationship.

It also said the United States encourages the two countries to "continue sincere discussions to ensure a lasting solution to historic issues."

In a recent visit to Seoul, U.S. Defense Secretary Mark Esper has said the GSOMIA termination would only benefit North Korea and China.

The U.S. Senate also passed a resolution Thursday that highlighted the importance of the intelligence pact and warned that the ongoing feud between the two Asian countries "only fractures the region and empowers its agitators."