A South Sudanese soldier fired two bullets at close range into a US embassy vehicle travelling in a convoy carrying the top US official in the country, the American official said.

The US ambassador, Charles Twining, said he was travelling in an armoured diplomatic convoy at 7.30pm on 19 October when a soldier in a military motorcade fired twice at a US vehicle behind his.

“We have bulletproof glass, thankfully, because it put two big holes in them,” Twining told a reporter in South Sudan in an interview.

The South Sudanese motorcade was carrying Vice-President James Wani Igga, said an army spokesman, Colonel Philip Aguer.

Aguer denied that any shots were fired and instead said the soldier hit the US vehicle with the butt of his gun. He said the guard has been arrested.

Twining said his convoy’s “follow car” a vehicle mandated to travel with US ambassadors following the deadly 2012 attack on a US diplomatic mission in Benghazi, Libya was stuck in traffic as the military motorcade approached.

Army motorcades ferrying officials through Juba, South Sudan’s capital, drive at high speeds and are accompanied by trucks packed with troops.

As the US follow car moved aside, a soldier jumped from his vehicle, fired two shots into windows on the left side, usually the driver’s side in South Sudan, before returning to his vehicle, said Twining. No one was injured in the US vehicle.

Twining said his convoy’s cars were marked with diplomatic plates, “but frankly it doesn’t matter if it’s diplomatic or not”.

Relations have cooled between Washington, which was behind the diplomatic push for South Sudan to break away from Sudan after a 2011 vote, and Juba. President Salva Kiir’s government is stuck in an 11-month civil war with fighters loyal to the former vice-president Riek Machar.

Kiir has accused Washington of supporting Machar. American diplomats deny the charge.

The US has given $621m in humanitarian aid this year to South Sudan.