Image caption The explosion reportedly happened at 20:30 GMT on Tuesday night

A device that exploded in Strabane, County Tyrone, was an attempt to kill police officers, the PSNI has said.

A device exploded while officers were on patrol on Tuesday night, police said.

Parts of the town have been cordoned off as a result of the security alert, and there is no access to the town via Liskey Road.

The explosion reportedly happened at about 20:30 GMT.

Media playback is unsupported on your device Media caption Chief Inspector Ivor Morton described the attack as 'madness'

"We are incredibly lucky that the lives of officers and other members of the community were not lost last night," said Supt Gordon McCalmont.

"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."

Gina Devine, who is a local community worker, said that the community centre was open last night for residents who were affected.

"Some residents who live in close proximity to where the device went off said that they did see smoke.

"This has been going on all night and there is secondary school just up the road. It is creating major traffic congestion," she said.

SDLP MLA Daniel McCrossan condemned the attack and said the device has been described as "substantial".

"Such attacks on the PSNI have no place in a modern progressive society," he said.

Earlier, Sinn Féin councillor Karina Carlin said she heard a bang when the device exploded.

"I went to the scene after the noise but I didn't see anything," she said.

"The police were trying to get residents out of their homes last night, but I urged them not to because there wasn't going to be any meaningful searching until this morning."

The Police Federation for Northern Ireland described those who planted the bomb as "terrorists" who had "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," said the federation in a statement.

"They peddle 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."