Bus drivers at the Rio Olympics have been informed to keep internal lights on at night to minimise the chance of an attack from local gangsters trying to harm police and military forces.

It comes after one of the journalists on a media bus hit by a rock - originally believed to be a bullet - complained of the lighting that she believed made the bus a target.

A member of the media stands near a shattered window on a bus in the Deodoro area of Rio de Janeiro after it came under attack. Credit:David Davies/PA via AP

However, Rio 2016 officials insist it is quite the opposite, admitting bus drivers had been told to turn their lights on to help locals distinguish between vehicles carrying security forces and those transporting athletes, media and officials - such is the angst towards the police and military.

"The internal lighting of the bus, if I understand this correctly, it serves also a measure of security," Rio 2016 spokesperson Mario Andrada said.