Incredible bodycamera footage has revealed the race against time for cops who rescued cats and dogs from a shelter under threat by wildfire.

Police in Vacaville, California rushed to the aide of the pets in the SPCA of Solano County on Friday as the flames of the Nelson Fire crept to within yards of the animal shelter.

Flames came within feet of the building where 60 animals were rescued from the shelter.

The community rallied and many of the rescued animals and were quickly given temporary foster homes in an outpouring of support.

'As the Nelson Fire raced towards the south end of town, it looked like the Solano SPCA would be the first to be hit by the flames,' the Vacaville PD said in a statement.

Police in Vacaville, California rushed to the aide of the pets in the SPCA of Solano County on Friday as the flames of the Nelson Fire crept closer

The officers loaded dozens of cats and dogs into their vehicles to evacuate them from the fire

A Vacaville police officer carries an animal in a crate from the SPCA of Solano County

'Our officers worked with Humane Animal Services, SPCA staff and volunteers to evacuate all they could in a race against the clock,' the department said.

Shelter staff had been put under mandatory evacuation with 'extremely short notice' as the wildfire raged closer, the SPCA said.

The video shows officers rushing into the shelter and leading out cats and dogs.

Officers loaded dogs into the backs of their vehicles and drove them to safety.

The shelter staff rallied in the parking lot of a nearby Burger King and put out the call for community support, which came flooding in.

A police officer is seen rushing the animals outside to her waiting car as the flames encroach

The police put the dogs directly into the back of their vehicles to escape the Nelson Fire

One dog even got a front seat ride as police loaded the animals up and escaped from the fire

Residents donated crates, food and bedding for the animals, while others opened their homes to temporarily foster the pets.

Fortunately, fire crews were able to stop the blaze before it destroyed the animal shelter - though photos of the aftermath show that the blaze came within yards of the structure.

The Nelson Fire, which started on Friday, burned a total of 2,162 acres and destroyed one structure before it was contained and extinguished over the weekend. The cause of the fire is still under investigation.

In a statement, the SPCA of Solano County thanked the police and community for support through the crisis.

A photo taken behind the animal shelter on Saturday shows just how close the burn area got

A helicopter hunts for hotspots over the blackened burn area behind the shelter on Saturday

'We thank you all so much for your donations, love, support, and concerns,' the shelter said. 'The Vacaville community has been so gracious to open their homes and hearts for us.'

Elsewhere in California, fire crews continued to turn the tide against other more massive wildfires.

In the north, the deadly Carr Fire near Redding was 57 per cent contained on Sunday night, and the Mendocino Complex Fire was 67 per cent contained.

In the south, the Holy Fire was 52 per cent contained on Sunday night.