A man has been charged with possessing a firearm at a polling station in West Tyrone.
Police investigating the incident in Greencastle, Co Tyrone detained the 59-year-old on Thursday during polling for the by-election.
He was charged and is to appear in court on Friday.
Police in Omagh received a report of a man acting suspiciously at a polling station on the Crockanboy Road, Greencastle, just before 1pm.
Chief electoral officer Virginia McVea said: "Earlier today a man approached the poll staff in Greencastle polling station and produced what appeared to be a handgun from his pocket.
"He engaged with staff then left the polling station without any weapon being discharged.
"The way that the staff dealt with it, I understand that other members of the public may have been unaware of the incident."
DUP leader Arlene Foster condemned the incident. Mrs Foster said: "It really is quite disgraceful that attempts to destroy democracy were on display today. It would have been a worrying situation for those at the polling station and the local people who were exercising their right to vote.
"Whether you are a unionist, nationalist or a republican - everyone should be afforded the right to vote. Everyone should be free go to a polling station and cast their vote, to choose who should represent them. It offends my sense of democracy when I hear that people from a minority community feel threatened when they go to cast their vote."
West Tyrone DUP candidate Thomas Buchanan said: "Praise must be given to the staff in Greencastle polling station that had to deal with this very alarming incident."
Ulster Unionist candidate Chris Smyth said: "I am shocked and appalled that something like this could happen.
"It is sad that we continue to have people in our society who want to terrorise and intimidate you just because of your political opinion."