North Korea’s July 4th test of an intercontinental ballistic missile (ICBM) once again underscored the growing danger North Korea poses to the United States—and the need to do something about it, now.

But we can’t lose sight of the bigger picture. Pyongyang’s missiles should not distract us from the fact that the greatest long-term challenge to America in Asia comes from China’s determination to dominate that vital part of the globe. Fortunately, the former presents an opportunity to deal with the latter.

The Trump administration can use the North Korean threat to strengthen America’s political relations and military posture in the region. This puts America in a better position to deal with China. And it also is the best means of convincing Beijing to rein in Kim Jong Un.

The first way the Trump administration can seize upon the North Korean threat is by improving political relations among U.S. allies and partners in the region. Following the end of World War II, America established what has been termed a “hub-and-spokes” alliance system in the region. In contrast to Europe where America formed NATO, in Asia the United States maintains strong ties with individual allies who have minimal involvement between each other.

Since many Asian nations remain wary of antagonizing China, North Korea presents a better opportunity for overcoming the obstacles to establishing such a security network. This is especially true in the case of improving ties between Japan and South Korea.

Although this arrangement worked for dealing with the Soviet Union during the Cold War, there is a growing recognition among the experts that is inadequate to deal with China. As a recent report from the bipartisan Center for New American Security put it, “Moving beyond isolated hub-and-spoke ties toward a more densely connected security network is a cost-effective way for the United States to advance its interests and uphold the regional rules-based order. It is also fully consistent with a strategy of encouraging U.S. allies and partners to assume a greater share of the burden for their security.”

Since many Asian nations remain wary of antagonizing China, North Korea presents a better opportunity for overcoming the obstacles to establishing such a security network. This is especially true in the case of improving ties between Japan and South Korea. Tokyo and Seoul are America’s most important allies in the region, with nearly 50,000 U.S. troops stationed in Japan and over half that number in South Korea. At the same time, Japan-South Korea relations are characterized by animosity due to multiple challenges, including a territorial dispute that flares up periodically. South Koreans also feel more affinity towards China than Japan, making it unlikely that Beijing’s rise will bring the two countries closer together.

North Korea offers the best opportunity to bind Tokyo and Seoul closer together. Both countries are threatened by Pyongyang, and this is one area where they are closer together than South Korea is to China. Already, North Korea has led Japan and South Korea to enter into an intelligence-sharing agreement. As Pyongyang’s nuclear capabilities grow, the United States should push Seoul and Tokyo to increase their own cooperation.

North Korea also offers an opportunity for the United States to strengthen its ties to other allies in the region, such as Thailand and the Philippines. Both countries are among America’s oldest allies in the Asia-Pacific. Their current governments, however, have sought to improve their ties with Beijing at the expense of Washington. As a leaked telephone call between President Trump and Philippine President Rodrigo Duterte demonstrates, these countries view Pyongyang as a threat to their own security. The Trump administration would be wise to use this as a way to bolster America’s ties to these traditional allies and other countries in Southeast Asia.

The United States should also use the North Korean threat to bolster its military posture in the Asia-Pacific. This can be done by deploying what might be called dual-use capabilities. That is, military capabilities that can help America defend itself and its allies against both North Korea and China.

One such example is anti-submarine warfare. As part of its relentless drive to modernize its military, Beijing has built up a massive submarine force. Indeed, according to some estimates, China’s military will field almost twice as many submarines as the United States within the next decade. North Korea is also developing a submarine-launched ballistic missile, which can be used to deliver nuclear warheads. Although Pyongyang is still years away from acquiring an operational sea-based nuclear deterrent, the time to begin planning for this eventuality is now. To do this, the United States should begin mining the Pacific with modern sensors and other emerging detection technologies to improve its ability to track and, if necessary, destroy enemy submarines. This can be justified by the need to deny North Korea a survivable sea-based deterrent, while also enhancing America’s ability to neutralize China’s undersea forces.

Other dual-use capabilities include strengthening surveillance, radars, and air and missile defense systems in the region. Once again, these new deployments can be justified in terms of needing to be able to track and destroy North Korean missiles that present a growing threat to the entire Asia-Pacific region, not to mention the U.S. homeland. At the same time, these capabilities can be used to better monitor Chinese military activities in the Western Pacific and defend against its growing air, naval, and missile capabilities. This could extend to helping allies and partners to dredge rocks, reefs, and islands throughout the Pacific to create features that could serve as makeshift air and naval bases in the event that U.S. military installations come under attack from China or North Korea.

More generally, the United States should use the North Korean threat to establish more multilateral military exercises simulating defense against missile attacks. Needless to say, this would provide valuable experience for defending against missile attacks originating from China or North Korea.

Finally, the need for U.S. allies and partners to defend themselves against North Korea can also be a pretext for selling them military systems that would also enhance their ability to deal with Chinese aggression. For instance, after North Korea launched an intermediate-range ballistic missile test in May, Japan expressed an interest in purchasing a new kind of anti-ballistic missile system from the United States. Similarly, Kim Jong Un’s provocations has led Tokyo to consider acquiring offensive missile capabilities for the first time in the post-WWII era.

The advantage of using this approach to respond to North Korea’s provocations was demonstrated nicely by America’s deployment of the Terminal High Altitude Area Defense (THAAD) missile defense system to the Korean Peninsula. Although THAAD’s interceptors can only shoot down close-range missiles, Beijing fiercely objected to the deployment because its radar system can be used to track Chinese missiles headed towards the United States or other hotspots in the region. As such, THAAD’s deployment was one of the first times Beijing paid a concrete price for its support of the Kim regime. Similar deployments in the future can begin to alter China’s cost-benefit calculus in a way that leads Beijing to do more to clamp down on North Korea.

There are other benefits as well. Most notably, China responded to THAAD by imposing covert economic sanctions on Seoul in an attempt to force it to cancel the deployment. This has poisoned relations between China and South Korea and shown other Asian nations the perils of a future in which China dominates the region. This can only serve to push allies closer to the United States, and increase their willingness to take a harder line against China. Both of these developments are very much in America’s national interest.