SACRAMENTO -- Two decades after California barred illegal immigrants from obtaining driver's licenses, Gov. Jerry Brown Thursday signed legislation that restores the privilege, ending a policy battle that liberal Democrats had been fighting -- and losing -- for years.

Brown initially opposed making driver's licenses available to people in the country illegally but later reversed his position when comprehensive immigration reform legislation stalled over the summer in the U.S. House of Representatives after passing the Senate.

Another controversial immigration measure, the so-called TRUST Act, which would restrict county jail officials from detaining immigrants without serious criminal records on behalf of federal immigration authorities, awaits his signature or veto by Oct. 13. Brown had vetoed a similar bill last year, but its author, Assemblyman Tom Ammiano, D-San Francisco, agreed to make changes requested by Brown.

Speaking on the steps of Los Angeles City Hall, Brown said the driver's license bill will make California's roadways safer by requiring that newly licensed motorists obtain insurance and take roadway safety courses.

The legislation also sends a clear message to the newly licensed drivers that they are valued here, he said.

"No longer are undocumented people in the shadows," Brown said. "They are alive and well and respected in the state of California."

Assembly Bill 60 requires the Department of Motor Vehicles to start issuing driver's licenses to undocumented immigrants by Jan. 1, 2015. The licenses must include a mark or symbol that distinguishes them from regular licenses -- a requirement of a post-9/11 federal law.

Assemblyman Luis Alejo, D-Watsonville, the sponsor of Assembly Bill 60, and Los Angeles City Councilman Gil Cedillo, a former state legislator who sponsored a similar bill in the mid-1990s, praised Brown for signing the bill and said it was long overdue.

Alejo called the new law a "historic measure," and Cedillo said it "opens a window of opportunity unfairly closed shut to millions of Californians in 1993."

That was the year the late Sen. Al Alquist, D-San Jose, sponsored a bill requiring that all driver's license applicants provide a Social Security number as proof of "legal presence" in the country.

Alquist said at the time that undocumented immigrants were using their licenses to unlawfully obtain welfare and other government benefits.

Opponents of comprehensive immigration reform called Brown's signing of AB60 a move that undermines enforcement of federal immigration laws and could threaten national security.

Ira Mehlman, a spokesman for the Federation for American Immigration Reform, said the documents drivers must present to obtain licenses are unverifiable and can be easily forged. It will be tough for the Department of Motor Vehicles to catch drivers attempting to validate false identities, said Mehlman, whose group works to reduce both legal and illegal immigration.

"This opens up the possibility of illegal aliens creating false identities not just because they want to work in California, but for all sorts of other reasons, including terrorism," Mehlman said.

But César Juarez, the former director of organizing for the Services, Immigrant Rights and Education Network, a San Jose group known as SIREN, scoffed at the idea that licenses would be used for anything but to lawfully travel on California's roads.

Juarez said his mother will be among the estimated 1.4 million immigrants who will be able to apply for a license under the new law.

"My mom has lived here more than 20 years and needs to drive to get to work, but has always been afraid of the consequences," Juarez said. "This law provides the relief from stress that she needs."

The Los Angeles Times contributed to this report. Contact Jessica Calefati at 916-441-2101. Follow her at Twitter.com/calefati. Read the Political Blotter at IBAbuzz.com/politics.