Soldiers in South Sudan

Members of the East Africa Response Force, a Djibouti-based joint team assigned to Combined Joint Task Force-Horn of Africa, disembark from a U.S. Air Force C-130 Hercules in Juba, South Sudan, to assist with evacuation of Americans. (Tech. Sgt. Micah Theurich / U.S. Air Force / December 18, 2013)

HONOLULU – President Obama warned Saturday that using military force to gain power in South Sudan could cost the country international support.

Obama was reacting to reports that four U.S. service members were wounded when South Sudanese militias fired on three U.S. military aircraft on a mission to evacuate American citizens. He encouraged talks to help end the violence in South Sudan.

“Any effort to seize power through the use of military force will result in the end of longstanding support from the United States and the international community,” the president said, according to White House officials.

South Sudan is spiraling dangerously toward civil war, with the army losing its grip on key regions, as the military splits and defectors seize control of key areas.

White House officials said Obama directed his aides to make it clear that the United States will continue to encourage the resolution of differences in South Sudan through dialog and emphasized his belief that the conflict “can only be resolved peacefully through negotiations.”

Obama, who has just begun a two-week vacation with his family in Hawaii, was updated on South Sudan during a call Saturday morning with National Security Advisor Susan Rice, Deputy National Security Advisors Tony Blinken and Ben Rhodes, and Grant Harris, senior director for African Affairs.

The U.S. planes had been headed to Bor, north of Juba, the capital. Juba is the main town in the eastern state of Jonglei, which is under the control of a rebel military faction associated with sacked vice president Riek Machar. Fighting has been intense in the region as South Sudan's army struggles to take back the town.

The planes were fired on as they made their approach, according to a statement from the U.S. military African command. The planes were forced to abort the rescue mission, turned back and flew to Uganda.

“We can confirm that four U.S. service members were injured today from gunfire directed at their aircraft in South Sudan. The aircraft was participating in a mission to evacuate American citizens in Bor,” the statement said.

The aircraft diverted to Kampala, the Ugandan capital, the Associated Press reported. The troops were then flown to Nairobi, Kenya, for treatment and are reported to be in stable condition.

There were no details on how many Americans were being evacuated, who they were and whether another rescue effort would be made.

The U.S. Embassy in Juba tweeted Saturday that 450 Americans and other foreigners have been evacuated in recent days.

“We will continue to monitor the situation on the ground in order to assess future possibilities for [evacuation] flights from South Sudan,” the embassy said.

ALSO:

Nigerian militants abduct dozens of schoolgirls

Prosecutor wraps up Oscar Pistorius' grueling cross-examination

Dutch teen draws arrest, mockery for tweeting threat to American Airlines

Twitter: @MaeveReston

maeve.reston@latimes.com

Times staff writers Robyn Dixon in Johannesburg, South Africa, and David S. Cloud in Washington, D.C. contributed to this report.