A PSNI Land Rover was struck on the window after coming under fire in a suspected dissident republican attack in the Bogside area of Derry city.
No one was injured in the incident, with the protective design of the vehicle being credited with saving officers' lives.
The shooting happened around 1am yesterday but details have only now been released as ballistic tests were required to establish if the strike marks were definitely caused by gunfire.
The vehicle, which was struck twice, was being driven along Westland Street, close to the Bogside Inn.
The PSNI has described the incident as "totally reckless".
Superintendent Garry Eaton said: "It is fortunate that we are not speaking about deaths or injuries today.
"Members of the crew were kept safe by protective equipment on the vehicle, however if the shots had missed, then anyone walking or standing on the street could have been hit.
"The officers were carrying out normal patrolling to keep the community safe. Those who organised and carried out the attack were totally reckless and showed total disregard for the lives of people in that community.
"Despite this incident; we remain committed to providing the people of Derry with the type of positive and dedicated policing that they ask and expect of us."
It is understood the type of gunfire has yet to be established but one line of police inquiry is that dissident republicans opposed to the peace process planned and carried out the attack.
Sinn Féin's Raymond McCartney condemned the shooting.
"This gun attack in a built up area such as the Bogside was totally reckless," said the Foyle representative.
"Westland Street is a busy thoroughfare and this attack put the lives of many people at risk.
"Thankfully no one was injured in this incident but we could have been faced with a tragedy.
"Those behind this attack have nothing to offer society and are not representative of the people of Derry.
"They need to immediately desist from these futile actions."
SDLP MLA Colum Eastwood also condemned the incident, saying "this is a shocking attack on our police service.
"The people who carried out this attack have no regard for their community, or for the future we are trying to build.
"These people need to hear the message loud and clear that their actions are not wanted in our community and they will never achieve the aims they say they want to achieve by violent means."