Two RUC officers and a woman were taken to hospital after the gun attack - blamed on dissident republicans - at a polling station in Draperstown, County Londonderry.
The injured are believed to be in a comfortable condition in hospital.
The shooting took place at about 2145 BST on Thursday just minutes before the close of voting in both local and general elections.
Northern Ireland Secretary John Reid has condemned the attack saying those who carried it out had shown "total contempt for democracy".
What they represented had been rejected "time and again by the people of Ireland, north and south", he added.
'All hell broke out'
A car matching the description of one used in the incident was found on fire shortly after 2200 BST.
Witness Patrick McNally e-mailed BBC News Online to tell how voters sprawled on the floor after the shots were fired.
Mr McNally said "all hell broke out" as a gunman appeared at the door of the school and "started shooting up the crowded foyer".
However, when voters recovered their composure they were refused the opportunity to vote because it was 2200 BST, said Mr McNally.
RUC District Commander Superintendent Terry Shevlin condemned the attack as "an utter attack against democracy in Northern Ireland."
"The police officers were engaged in protecting people's right to vote," he said.
"These persons for whatever reason have decided to show in a most violent demonstration their disregard for democracy."
" I think this is a typical reaction of those who put the bullet and the bomb before the ballot box "
Police said a silver Volkswagen Passat car pulled up outside St Mary's Primary School in the village and a man got out and fired shots. The police officers returned fire with one shot.
One officer was hit in the shoulder and the other in the arm. The woman was shot in the leg. Their injuries are not life threatening.
The police have appealed for information on the car, registration number HCZ 5415.
BBC Northern Ireland's chief security correspondent Brian Rowan said security sources believe republican dissidents were behind this shooting, and had assessed the threat they posed as extremely high.
The SDLP assembly member for Mid-Ulster, Denis Haughey, said there was no place for such violence in society.
"This is not just a murderous and thuggish attack on the lives of police officers, it's an attack on democracy," he said.
Democratic Unionist Party leader Ian Paisley said he was not surprised by the attack.
"IRA terrorists detest democracy and they are not at all happy about the large turnout of the loyalist people in Northern Ireland at the polls, which has been immense in the loyalist areas," he said.
"I think this is a typical reaction of those who put the bullet and the bomb before the ballot box."