By Charles Haviland
BBC News, Kathmandu
Nepal declared itself a republic last month
Nepal's Supreme Court has ordered the relocation of the cavalry, in the latest blow to the abolished monarchy and the traditionally pro-royal army.
The case was brought on the grounds that the horses pollute the main complex of government buildings.
Nepal became a republic late last month, but up to now the King's Household Cavalry has not had to change its name.
It will, however, have to move its headquarters within a year.
The cavalry has been part of the Nepalese army since the 19th Century. With more than 100 horses it has an important ceremonial role.
It has been ordered to relocate for environmental reasons.
Both the Supreme Court itself and the lawyers who brought the public-interest litigation case seem to have had a personal interest in this outcome.
The court and Nepal's bar association are situated in the rambling and ornate complex called Singha Durbar, which houses many ministries. It also houses the cavalry.
According to the lawyer who brought this case, Prakash Sharma, the waste matter from the horses gives off such a bad smell that people working near the stables have to close their windows or flee to other offices.
He told the BBC it was especially off-putting for judges currently undergoing a gender equality workshop.
Mr Sharma said that under the Supreme Court ruling, the cavalry would have to move and its waste be properly managed.
No location has been suggested but Mr Sharma suggested a "less dense area". The judges said people's health was being damaged.