Police have said an explosion in Strabane was an attempt to kill officers.
The alert began on Tuesday night in Townsend Street.
Police said a device exploded while three officers were on patrol in the area after 8.30pm.
In a statement the PSNI said: “The investigation is at an early stage and we have had to ask some residents to leave their homes while we carry out our enquiries. While we are unable to go into specifics of the incident at this stage, I am confident in saying that we are incredibly lucky that the lives of officers and other members of the community were not lost last night.
“We appreciate the understanding and patience of local residents while we carry out our enquiries and would appeal for anyone with information about suspicious activity in the area to contact us.”
Sinn Fein councillor Karina Carlin said a loud bang was heard in the area at around 8pm.
The Police Federation for Northern Ireland, which represents rank and file officers, condemned the attempt as a "reckless and mindless act".
Chairman Mark Lindsay said: "The people who detonated an IED near a Police patrol have nothing to offer. They are fixed firmly in the past with nothing to offer a community that is trying to build a better here and now and a more positive future.
"They pedal in misery. They are a throwback to bad times. They oppress and brutalise people and deserve to be ostracised, caught, convicted and given tough prison sentences.
"Last night, our Officers escaped unhurt in a clear attempt to murder and maim. On or off duty, officers are at high alert and that situation will remain the case for the foreseeable future."
Secretary of State for Northern Ireland James Brokenshire said condemned the attack.
He said: "Those who planted this explosive device intended to kill or cause serious injury. Their actions put all of our community in harm’s way and their murderous intent is not reflective of wider society’s desire for peace.
"The Police Service of Northern Ireland has our unstinting support and I urge anyone with any information to contact the PSNI."
DUP MLA Tom Buchanan condemned attack saying those behind it had a "clear determination to drag Northern Ireland back to a time of violence and fear".
He said: “This is the latest attempt to murder police officers in Strabane. Over the last few years there has been a number of such attempts as well as a series of other security alerts where the components for explosive devices have been uncovered.
"We are all thankful that no one was injured in this latest incident, but there is a clear determination from those behind these attacks to drag Northern Ireland back to a time of violence and fear.
"There must be a united and resolute stand from right across the political spectrum to such activities. They can never be justified and that should be the message emanating from all those in a position of leadership within the Strabane area.”
Alliance Justice spokesman Trevor Lunn urged anyone with information to contact police immediately.
He said: “This type of attack achieves nothing except putting police officers, who are trying to protect the local community, in danger and diverting vital resources from other areas that might need them.
“There is no justification for this attack. Any act of violence against police is an assault on the rule of law and everyone in our society.
“I urge anyone with information to contact police with it immediately.”