Because of the remote terrain, no homes were threatened, and there were no injuries, said Eric Cohen, a spokesman for the California Department of Forestry and Fire Protection.
To the north, a much smaller brush fire threatened homes in Hayward, but was contained before any major damage occurred.
By 7 p.m., more than 200 firefighters attacked the Mount Hamilton fire, including state crews from Napa and Sonoma counties, along with San Jose city crews.
The blaze broke out about 2 p.m. near remote Kincaid Road, on the western slopes of Mount Hamilton between Joseph D. Grant County Park and Lick Observatory.
"We're in the heavy brush and oak woodlands," Cohen said. "We have steep terrain. It's going to be at least another 24 hours until everything is taken care of on that fire."
The observatory, located atop the 4,200-foot Mount Hamilton peak since 1888 and operated by UC Santa Cruz, was not threatened. The cause of the blaze was unknown.
Three helicopters and two air tankers dropped water and flame retardant on the blaze. They were aided by 11 state fire engines and four engines from San Jose.
Smoke from the blaze was visible from Gilroy to Alameda County.
The cause of the fire remains under investigation, said Cohen, who added that it appeared to have started in a creekbed. Temperatures of 90 degrees or higher through the Diablo Range exacerbated the problem, as did the rugged landscape.
"Some areas are so steep, you can't walk up there," he said. "Once the fog bank comes in tonight, that should slow the fire."
Meanwhile, the smaller blaze in the foothills east of Hayward threatened several homes along Machado Court on Sunday afternoon.
That fire burned only about five acres, causing minor damage to several homes. But it prompted fears that flames could explode into wooded canyons thick with eucalyptus trees.
Some people living near the Hayward fire voluntarily evacuated, but by 7 p.m., the blaze was under control.
"With this kind of fire, we hit it hard and early," said Alameda County Assistant Fire Chief Dave Wheeler.
The fire started at the top of a hill near Machado Court, in an unincorporated area about half a mile south of Interstate 580. The cause was unknown. Roughly 140 firefighters, 35 engines and four aircraft were dispatched to quell the blaze, which started at 4:12 p.m.
LaShawn Holden, 31, was in the back yard of her Machado home when she smelled the smoke.
"At first I thought somebody was barbecuing," she said. "But then I saw a couple of trees go up in smoke and I said, 'Time to go.'"
Holden grabbed her two young children as firefighters advised her neighbors to evacuate.
"I'm thankful," she said, as residents began returning to their homes. "Not knowing was the worst part."
The Diablo Range is no stranger to fires. Last year, a spectacular August lightning storm sparked half a dozen large blazes, which burned at least 24,000 acres.
So far this year, California is off to a tougher-than-normal fire season.
Through Aug. 1, there were 4,817 fires that had burned statewide, blackening 73,385 acres. By comparison, by Aug. 1, 2003, only 3,357 fires had burned in California, charring 51,684 acres, state statistics show.