The United Nations just passed the harshest sanctions package it’s ever adopted against North Korea after the country conducted its sixth and largest nuclear test last week.

But the US only managed to push the sanctions through after dropping some key measures — like a total ban on shipments of oil into North Korea — in an effort to get China and Russia on board.

Both of those countries are concerned about North Korea’s nuclear program, but they’re also worried that if the world leans too hard on the country it could act rashly or become unstable, potentially creating a refugee or security crisis on their borders. Since both countries have veto power over UN Security Council resolutions, their buy-in is essential.

And so the sanctions that passed unanimously through the Security Council on Monday evening represented a compromise between the US position and China and Russia’s. They were undeniably tough, but not crippling for Pyongyang.

Among other things, the new sanctions:

Ban all North Korean textile exports

Cut off more than 55 percent of refined petroleum products such as gasoline and fuel going to North Korea

Cap shipments of crude oil into North Korea at current levels

Ban countries from hiring new North Korean workers

Authorize new measures for cracking down on North Korea’s maritime smuggling

Place new restrictions on North Korean government organizations like the Central Military Commission and the Propaganda and Agitation Department

Combined, the sanctions are designed to take a $1.3 billion chunk out of Pyongyang’s revenues — a serious blow to the North’s economy and its ability to pursue its nuclear and ballistic missile programs.

"We are done trying to prod the regime to do the right thing; we are now trying to stop it from having the ability to do the wrong thing," US Ambassador to the UN Nikki Haley said after the vote on Monday.

The biggest measures in the sanctions package are the ones that limit North Korea’s textile exports and oil imports. Textiles represent Pyongyang’s second-largest export after coal and other minerals, which have been targeted by previous rounds of UN sanctions. Textiles make up about a quarter of North Korea’s income from trade — a vast majority of which is with China.

According to the US Mission to the UN, the combination of the textile ban with previous UN sanctions makes it so that more than 90 percent of North Korea’s publicly reported exports have now been embargoed.

And the reduction of petroleum products flowing into North Korea is a serious tool for pinching the country’s technological ambitions.

The US wanted much harder-hitting sanctions. China and Russia didn’t.

But all these measures fall well short of what the US was seeking to include in the original package. America wanted a ban on all oil flowing into North Korea, but that didn’t make it into the resolution. Instead, current crude oil imports into North Korea are capped at current levels, and the flow of refined oil products into the country are merely reduced.

“Clearly the Security Council is treading lightly in banning exports to North Korea,” Kent Boydston, a research analyst who specializes in North Korea at the Peterson Institute for International Economics, told me.

The US also wanted to place a full asset freeze on North Korean leader Kim Jong Un, but that didn’t make it into the resolution. Instead, the sanctions target other government organizations with asset freezes.

And the US wanted to ban countries from employing North Korean workers altogether, as they provide a useful source of revenue for Pyongyang, but that didn’t make it into the resolution either. Instead, the sanctions ban future hiring of workers and the renewal of work contracts with North Korean laborers, leaving current working arrangements untouched. Currently, North Korea has close to 100,000 people earning wages abroad.

Chinese and Russian negotiators ensured that the sanctions were watered down before they went for a vote. That’s because those countries bring a different set of calculations to the table when it comes to reining in North Korea’s fixation on becoming a global nuclear power.

China isn’t as worried about North Korea’s nuclear program as it is the potential collapse of the country itself, which would create a refugee crisis on the Korean Peninsula and likely send millions of North Koreans pouring across the Chinese–North Korean border.

China also believes the US would dramatically increase its military presence in the region to deal with the fallout from the collapse and to secure North Korea’s nuclear weapons. A US military presence on China’s border is not something China’s leaders want to see anytime soon. As a result, China helps prop up the North Korean leadership knowing that a stable North Korea serves as a strategic buffer for itself.

Russia is a more peripheral player on North Korea — it shares a much smaller border with the country, and its trade with Pyongyang is just a fraction of the trade between North Korea and China. But it has a very real interest in regional stability and keeping US presence in the area as limited as possible.

And some analysts believe that Moscow is also making a bid to become a power player in future negotiations with North Korea over its nuclear program outside of the UN.

“With Russia, this is not only about North Korea but about Moscow’s place in world politics,” Janka Oertel, a German Marshall Fund of the United States, told me in the runup to the vote.

Russia has been inviting American diplomats to Moscow to discuss the possibility of such talks. If Russia succeeds in securing a seat at the table during serious negotiations, it can use that diplomatic process to pursue its own interests and make yet another claim to being a major player in global affairs. In the meantime, it might continue to make the US’s life harder at the UN.