Two men have been charged after allegedly lighting fires during Wednesday's total fire ban.

Police allege that Rhys Mackay, 37, loosened a footpath in Sydney's inner west with a crowbar and then set the electrical wires underneath alight just before 2am on Wednesday.

Firefighters tackle a blaze in NSW on a Wednesday when a total fire ban was in force. Credit:Nick Moir

It is alleged that he left with a woman, whom police are seeking to identify.

Emergency services were called to the scene on Johnston Street, Annandale. The fire was extinguished and officers from Leichhardt Police Area Command began an investigation.