Gen. Stephen J. Townsend, the head of the military’s Africa Command, or Africom, is expected to face tough questioning on Thursday, when he is scheduled to testify before the Senate Armed Services Committee.

“Any drawdown of our troops would be shortsighted, could cripple Africom’s ability to execute its mission and, as a result, would harm national security,” Senator James M. Inhofe of Oklahoma, the committee’s chairman, said in a statement this month.

As the Pentagon weighs its options, the Kremlin continues to press ahead on the continent. Ultimately, great power competition translates to the United States’ attempts to leverage its weight as a military and economic superpower, albeit one that sometimes operates with bureaucratic sluggishness, against the ability of China and Russia to send money, troops and matériel with speed — and little, if any, oversight.

China has vastly increased its commercial investments in Africa in recent years, building factories and railroads, and it operates a major port in Djibouti. The Chinese military is also eyeing the construction of a new port in Senegal under the guise of assisting the Senegalese Navy, according to a United States military official.

Russian officials are eyeing the port of Berbera as a location for their base on the coast of Somaliland, a self-declared state within Somalia on the Gulf of Aden, according to Defense Department officials. Both China and the United States, with military bases in Djibouti, share the same coastline as the potential Russian port.

Russia has also expressed interest in building a naval logistics center in Eritrea, but it is unclear how far along those negotiations are, American officials said.

About 1,500 miles south, down the eastern coast of Africa, Russian military transport planes landed last summer in Cabo Delgado Province in northern Mozambique and, according to American officials, deployed about 160 personnel belonging to the Wagner Group, a Russian private military contractor.