The 150-acre blaze started near a corporate housing complex east of Universal City, south of the Warner Bros. studios complex in Burbank.
Mayor Antonio Villaraigosa said two teens from Illinois were in custody and told authorities they caused the fire. He said there was a witness, but he had no other details.
"They've admitted that they started this fire," the mayor said at a news conference. He said they were "old enough to know what they were doing."
The teens walked into a Burbank police station in midafternoon and were turned over to Los Angeles police, police Lt. Ron Caruso said.
The 16- and 17-year-old boys, who were visiting Los Angeles with their parents, had been staying at the housing complex, the mayor said.
They have been arrested on suspicion of reckless setting of a fire and released to their parents, said Ron Myers, a fire department spokesman. They could be charged after prosecutors review the case Monday, he said.
For several hours smoke roiled into the sky behind the famous Hollywood sign that stands on the south face of the hills, but the flames made no move down the south face and by late afternoon the landmark appeared to be well out of any danger.
Nonetheless, dozens of people gathered at the foot of the hills to take pictures of the sign and smoke.
"If it burns, we would be losing an icon," said Russ Mitchell, a Los Angeles resident.
Some 200 firefighters with five helicopters fought the flames, Fire Department spokesman Ron Myers said. There were no reports of structural damage, he said.
The fire was contained by Friday evening, but firefighters were making sure it did not spread, Deputy Fire Chief Mario Rueda said.
During the height of the fire, Scott Rowe, vice president of corporate communications for Warner Bros. Entertainment said the company was monitoring the situation.
"The studio is fairly filled with smoke at the moment," he said. "It's at our back door. I think a couple of our entrances have been closed at this point and we're operating normally but that could change any minute."
CBS News correspondent Bill Whitaker reports that Southern California is a tinderbox. Rainfall has been far below normal this year, and now the fire season is starting far earlier than normal.
The region had an extremely dry winter with little rainfall, leaving much of the area parched. Humidity also was low, about 10 percent, which makes vegetation burn more easily.
The Hollywood Hills bisect Los Angeles, forming the southern side of the San Fernando Valley.