You may love him. You may hate him. Either way, Donald Trump will be the next president of the United States. The tasks ahead of him are enormous. Most of the early focus has been on what he will do in regard to domestic policy. Abroad, however, he will find the challenges no less daunting.

President Bush made his share of foreign policy and national security mistakes. Nothing he did came close to matching the scale of the disasters presided over by President Obama. Worldwide, on an unprecedented scale, the United States finds itself facing truly strategic threats that, if not confronted and successfully mastered, will fundamentally reshape the balance of power on the planet.

The South China Sea

Eight years ago the South China Sea was a body of water outside of the territorial boundaries of any nation state. The free passage of all merchant vessels was guaranteed not only by international law but also by the firepower of the U.S. Navy’s Seventh Fleet, as it had been since at least 1945.

Today, the South China Sea is claimed in its entirety by the People’s Republic of China. That claim is not simply a paper one. It is supported by the presence of an impressive string of man-made fortified islands built by Chinese engineers and manned by Chinese troops.

Weak American diplomatic protests, the ruling of the International Court of Justice against Chinese actions, and periodic freedom of navigation transits of the area by U.S. warships have made no difference. The reality is that the Chinese now control a very large portion of the Pacific Ocean and can act anytime they please to put a stranglehold on one of the world’s most important shipping lanes.

Russia and the Middle East

In the wake of the crushing defeat of Soviet-backed Arab forces in the Yom Kippur War of 1974, Russian influence in the Middle East virtually vanished. For decades thereafter the Russians lost one after another of their traditional allies and became largely strategically irrelevant across the region. No more.

Emboldened by the lack of American response to the invasions of Georgia and Ukraine and by the sheer incompetence of American efforts in Iraq and Syria, Russia has reemerged as a major player in the Middle East. Russian troops and aircraft are on the ground in Syria in large numbers. A massive Russian fleet is hovering in the eastern Mediterranean, preparing to level what is left of Aleppo. The United States is on the defensive and boxed out, and traditional American allies are wrestling with what appears to be a new regional balance of power.

Iran

For decades following the fall of the Shah, American foreign policy in the Middle East was predicated on support for Israel and the containment of the radical Islamic Republic of Iran. Based on a naïve belief that the Iranians could be constructive players on the world stage and an irrational obsession with concluding a nuclear deal with Iran, the Obama administration abandoned this policy completely, walked away from traditional allies, and granted massive concessions to Tehran.

The result has been disastrous. Lebanon is now a client state of Tehran, as is Syria. Yemen is being torn apart by Iranian-backed Houthi rebels. Baghdad is teetering on the edge of falling completely under the control of Iranian-backed Shia militias, and we may yet see, once Mosul has fallen, American forces there being attacked and driven from the country.

Sunni Islamic extremism

We are in a global war with Sunni Islamic extremism. We are not winning. Eight years ago, ISIS did not exist in its present form. It is now a worldwide organization, and its impending loss of Mosul will not change that. Al-Qaeda is not defeated, and in fact has more members now by far than it did on 9/11. Dozens of other groups with shifting forms and allegiances are active across the globe and pose serious threats to nations in North and Sub-Saharan Africa in particular.

Our efforts to combat this threat over the last eight years have been hesitant and halfhearted. Locked in what is fundamentally an ideological struggle, we have been afraid to deal with it as such. We have acted slowly and have consistently attempted to respond to strategic threats with limited tactical efforts. Faced with the fundamental truth in Iraq, for instance, that any final defeat of ISIS will require addressing the Sunni-Shia divide and crafting a viable political way forward, we have instead simply focused on training Iraqi forces and flying air cover for what looks increasingly like a Shia conquest of the Sunni heartland.

The border

Most discussion of the Mexican-American border focuses on illegal immigration and the fate of undocumented persons already inside the United States. What gets lost in this discussion are the massive national security implications of the Obama administration’s open-border policies.

President Obama has, over the last eight years, systemically shut down very large portions of American border-control efforts. The Border Patrol has in a very real sense been converted from a border control force to a “welcome wagon” for tens of thousands of individuals illegally entering the United States. Many of these persons are from Central America. Many others are from East Asia, the Middle East, and Africa.

Without question, the overwhelming majority of such individuals coming to the United States are seeking nothing more than a new life. It is impossible to believe, however, that we can shut down our border defenses and invite illegal immigrants from all over the globe to walk in and not also find that groups bent on our destruction have taken advantage of this opportunity.

We have seen in Europe what unbridled illegal immigration has meant. In case after case we have seen conclusive proof of the exploitation of this wave of migrants by groups such as ISIS, which has allowed them to move operatives into position for attacks. If we do not regain control of our borders, we will see the same thing here.

There are no simple, easy solutions to any of the problems outlined above. It has taken us eight years to get to where we are today. It will take years to regain our strategic footing and gain the upper hand. It is imperative, however, as Trump and his new national security team settle in, that they quickly survey the damage done abroad by eight years of failed policies and act decisively to move us in a new direction.