Uganda has deployed special forces to South Sudan's capital, Juba, to help President Salva Kiir to "secure it", Uganda's military chief Gen Muhoozi Kainerugaba has said.
The move comes as tensions escalate between Kiir and his deputy Riek Machar, raising fears that their fragile peace deal could collapse and a conflict could resume.
Gen Kainerugaba did not give reasons for the deployment to the neighbouring state but said that any move against Kiir "is a declaration of war against Uganda".
"We shall protect the entire territory of South Sudan like it was our own," he added on the social media platform X.
South Sudan's government has not yet commented on the deployment.
Concern about the security situation in South Sudan has been mounting, with the US on Saturday ordering the evacuation of all its non-emergency staff from the country.
Last week, the deputy chief of the army and two ministers - all allies of Machar - were arrested by the security forces, which an opposition spokesman called a "grave violation" of the peace deal.
One of the ministers has since been released.
The arrests followed clashes in the Upper Nile state between government forces and a militia known as the White Army.
It had fought alongside Machar during the civil war that broke out in 2013 following a power struggle between him and Kiir.
It led to heavy fighting in Juba, with Kiir accusing Machar of plotting a coup.
Machar denied the allegation, but South Sudan then plunged into a civil war that killed more than 400,000 people.
A 2018 power-sharing agreement between the two stopped the fighting, but key elements of the deal have not been implemented – including a new constitution, an election and the reunification of armed groups into a single army.