A young girl has undergone surgery after she and her father were attacked by a dog in Sydney's southwest on Saturday morning.

Ambulance and police officers were called to Barbera street in Fairfield about 11am after panicked bystanders witnessed the alleged attack by a Staffordshire Bull Terrier.

Crews arrived to find a four-year-old girl with wounds to her leg, while her 44-year-old father had been bitten on the buttocks.

The dog was found nearby, contained and later collected by council rangers.

The girl was taken to the Children's Hospital at Westmead, where she underwent surgery and is in a stable condition.

Ambulance officers were called to a street in Fairfield just after 11am after panicked bystanders witnessed the alleged attack by a Staffordshire Bull Terrier (stock image)

Police managed to corner the dog in a commercial parking garage until animal control officers arrived.

The dog was scanned for microchip identification and transported from the scene by officers.

Purebred or mixed American Staffordshire Terriers have been linked to four fatal dog attacks in Australia this year.

The most recent attack happened in Melbourne's north in July where a 61-year-old man was fatally mauled.

In New South Wales dog breeds that cannot be registered and are restricted are the American Pit Bull, Tosa, Dogo Argentino, Fila Brasileiro.

While the genetics of specific breeds can affect the aggressiveness of dogs, the RSPCA has stated dog attacks are more a matter of individual animals.