A state of emergency has been declared in California following a devastating wildfire that has spread inside the border of Yosemite National Park.

The blaze grew overnight to more than three times the size of the city of San Francisco, officials said on Friday.

The flames have forced the evacuation of hundreds from their homes, and tourists were urged to leave camp sites.

California Department of Forestry and Fire Protection spokesman Daniel Berlant said the blaze had grown from 256 square kilometres to more than 427 square kilometres and was only 2 percent contained.

Berlant said the fire threatened about 4,500 residences.

The fire is one of several blazes burning in or near the nation's national parks and one of 50 major uncontained fires burning across the western US

While Yosemite remains open, the wildfire caused the closure of a 6-kilometre stretch of State Route 120, one of three entrances into the park on the west side, devastating areas that rely on tourism.

Source: Agencies