Media playback is unsupported on your device Media caption Tyres, flags, election posters and wooden pallets were burned on the bonfire

A bomb was thrown at a police patrol near the scene of a controversial nationalist bonfire overnight in Londonderry, police have said.

A number of homes on Charlotte Street were evacuated during a security alert that ended at 03:13 BST.

The "viable device" was thrown at the Lecky Road flyover, police said.

Media playback is unsupported on your device Media caption Last-minute talks to move the bonfire to a safer place broke down on Monday

The fire reached 20ft (6m) in height and partially blocked the road, leading to complaints from some residents..

Union jacks and Sinn Féin election posters were burned on the fire.

"We are investigating all offences committed at the bonfire in the Bogside last night, including a serious incident where a viable pipe bomb-type device was thrown at a police patrol," said PSNI District Commander Mark McEwan.

Image copyright Press Eye Image caption Part of the Lecky Road in Derry was blocked, causing disruption to traffic

Foyle Democratic Unionist Party MLA Gary Middleton, who was in the Bogside earlier on Monday, condemned those behind the attack.

"The fact that a viable pipe bomb was thrown, potentially putting dozens of lives at risk, is a deeply worrying incident," he said.

"Those who constructed and threw this device are terrorists who clearly have no regard for the lives of anyone in the city.

Image copyright Press Eye Image caption The structure was in the middle of a main road

"My thoughts are also with many residents who were forced to leave their homes for a number of hours last night," Mr Middleton added.

A last-minute attempt to move the structure from the middle of the road failed on Monday night.

Sinn Féin MLA Raymond McCartney said he believed dissident republicans were responsible for the bonfire and the security alert.

"I don't think the focus should be on the election posters," said Mr McCartney.

Image copyright Press Eye Image caption A council operation to clean up the burnt debris began on Tuesday morning

"There was election posters of all other parties, ourselves included.

"This isn't an act of defiance, this is a group of young people aided and abetted by other dissident elements in this city."

Independent councillor Gary Donnelly said young people in the area have been forgotten about.

Image copyright Press Eye Image caption The bonfire, which reached 20ft (6m) in height, was built in the middle of a main road in Derry

"People need to sit around the table and have dialogue - there seems to be a complete disconnect with the young people in that area," he said.

"All week they have been bombarded by a relentless demonisation and criminalisation policy by some elected representatives.

"They will no doubt say that two or three thousand people at that bonfire in the Bogside would be support."

Image copyright Press Eye Image caption Nationalist politicians have criticised the bonfire, which was bedecked in union flags and Sinn Féin election posters

A number of community festivals were held in Creggan, Shantallow and the Bogside to provide an alternative to the annual bonfire.

Bonfires are traditionally set alight on 15 August in some nationalist areas of Derry to mark the Catholic feast day of the Assumption.

The date commemorates the Virgin Mary's death and assumption into heaven.

Image copyright Press Eye Image caption Bonfires are traditionally set on fire on 15 August in some nationalist areas

However, nationalist and republican politicians have criticised the practice, saying it causes disruption to local residents.

Social Democratic and Labour Party councillor John Boyle said: "We need to find different ways of celebrating culture.

"If the police or any other statutory agency had attempted to remove the bonfire we may well actually have been looking at something a hell of a lot worse than we're looking at currently."