Democratic Gov. Jerry Brown signed the bill in front of a cheering crowd of immigrants and their supporters, predicting other parts of the country will follow the example set by the nation's most populous state.
The licenses, which are expected to become available no later than January 2015, will carry a special designation on the front and a notice stating that the document is not official federal identification and cannot be used to prove eligibility for employment or public benefits.
"This is only the first step," Brown said outside City Hall in Los Angeles. "When a million people without their documents drive legally and with respect in the state of California, the rest of this country will have to stand up and take notice. No longer are undocumented people in the shadows."
Ten other states have enacted measures to give driver's licenses to immigrants in the country illegally, many of them in the past year, according to the National Immigration Law Center.
Some of those states issue only one kind of license. But laws in many states, including Oregon and Colorado, create distinctions between the license given to immigrants and the one issued to other drivers.
Some immigrant advocates initially raised concerns that a different license in California would contribute to racial profiling. The new law bans discrimination based on the license and states that the license cannot be used as a basis for arresting someone for being in the U.S. illegally.
State Senate President Pro Tem Darrell Steinberg said he believes the marker is insignificant in relation to what the license will do for immigrants.
"Those distinctions mean little to hard-working people who simply want to drive to work or drive their kids to school or soccer practice without fear," he said.
State officials estimate 1.4 million drivers will apply for licenses under the law during the first three years. The measure, written by Democratic Assemblyman Luis Alejo, will grant licenses to anyone who passes the written and road tests, regardless of immigration status.
State and local officials touted the importance of getting immigrants properly trained and tested so that they know how to drive and are familiar with the rules of the road in California.
"That's what this bill is about, making the streets of this state safer," Los Angeles Police Chief Charlie Beck said. The bill had the backing of the state's Police Chiefs Association and insurance authorities.
It isn't clear whether entities such as local government offices, libraries or banks will accept the license as identification.
Over the past two decades, immigrant advocates have pushed to get licenses in California. The effort took on more urgency in recent years as immigrants caught driving without a license began seeing their cars impounded and wound up being screened by federal immigration authorities for deportation.
Former state lawmaker and current Los Angeles City Councilman Gil Cedillo said he introduced the license bill 11 times over 15 years, but the measure failed to get enough votes or was vetoed or repealed.
Cedillo said the license will bear a marker to comply with a federal identification law enacted after the 2001 terrorist attacks but that won't impede immigrants desperate to drive legally from applying for it.
In the Legislature, opponents of the bill said granting a license with special markings would put employers and landlords in a conflict between complying with state and federal laws.
The bill is one of several immigrant-friendly measures passed by the Legislature this year, including overtime pay for domestic workers and an effort to scale back collaboration between local law enforcement and federal immigration officials.
Brown has enjoyed strong support among Latino voters, whose numbers are growing in California. On the steps of City Hall, scores of immigrant rights activists chanted "champion" in Spanish at the mention of his name.
He urged lawmakers to move forward on more sweeping immigration reform on Capitol Hill, where an overhaul has stalled.
Ismael Salvador, a 63-year-old factory worker from El Salvador, turned out to see the bill-signing. He said the change will radically alter the lives of his two daughters, who are in the country illegally.
One risks driving every morning to her job as a lunch truck cook, and the other cleans houses and relies on rides because she is afraid to get behind the wheel, he said.