Two people were struck by lightning in Sydney as thunderstorms delivered dark skies and rain across the city.

A woman was struck by lightning in St Marys just after 5pm on Tuesday, as the storms rolled over Sydney from the west. She was treated by paramedics and taken to Nepean Hospital in a stable condition before being discharged later.

A second woman, in her 20s, was similarly struck in Newtown, in Sydney's inner west, about 6pm and taken to Royal Prince Alfred Hospital, where she remains in a serious but stable condition.

The extent of each woman's injuries was unknown.