NAIROBI/JUBA (Reuters) - South Sudan’s army has executed two soldiers by firing squad for murder in the northwest and detained 19 others for offences ranging from murder to looting in Juba after fighting in July between government and opposition troops, officials said.

The government this month rejected a report by the U.N. High Commissioner for Human Rights which cited acts of rape and killing in Juba in July, during and after the fierce fighting

But officials on Wednesday said the government took such allegations seriously and was investigating them.

"These claims of rapes and human rights violations are serious issues and a number of soldiers have already been punished and capital punishment applied," Vice President Taban Deng told a news conference in Nairobi.

Deng did not say how many troops had been arrested. But army spokesman Lul Ruai told Reuters in Juba that 19 men had been detained in the capital on charges of murder, random shooting, looting and other crimes.

The two soldiers executed were shot two weeks ago in the northwest town of Wau after being found guilty of murder.

The United Nations said on Tuesday it was investigating accusations peacekeepers in South Sudan failed to respond properly to an attack on a Juba hotel by uniformed men who killed a journalist and raped several civilians.

South Sudan officials have said the fact the men were uniformed did not mean they were either government soldiers or opposition troops. The vice president told reporters that such allegations were being investigated nontheless

(Reporting by Neha Wadekar and George Hakim; Editing by Edmund Blair and Richard Balmforth)