WASHINGTON — The Trump administration rolled out a new strategy for Africa on Thursday, but it was really all about China.

John R. Bolton, President Trump’s national security adviser, said the United States would lavish money and greater attention on the African continent, casting it as a crucial battleground in the global economic contest between the United States and China.

But Mr. Bolton conceded that the United States had limited resources to compete with the tens of billions of dollars China is pouring into Africa. He also threatened to withdraw American aid for some United Nations peacekeeping missions, which he labeled ineffective, as well as for certain African countries like South Sudan that he said were corrupt or ungrateful.

Mr. Bolton’s speech, at the Heritage Foundation, was his latest effort to flesh out what Mr. Trump’s “America First” foreign policy means for particular regions. In Africa, he said, the greatest threat came not from poverty or Islamist extremism but from an expansionist China, as well as Russia.