Maria, 18, who is an undocumented migrant from Central America, looks out of a window in Los Angeles on July 22. (Lucy Nicholson/Reuters)

Children in California who illegally entered the country will get access to millions of dollars in legal aid under a new state law.

Gov. Jerry Brown (D) signed a measure into law over the weekend that provides $3 million to nonprofits that offer such aid to undocumented immigrant children. The bill addresses what President Obama earlier this year described as a humanitarian crisis, following a summer surge in the number of unaccompanied children, mostly from Central American countries, streaming across the border.

“Helping these young people navigate our legal system is the decent thing to do, and it’s consistent with the progressive spirit of California,” Brown said in introducing the bill late last month alongside the leaders of the state Assembly, Senate, members of the Latino Legislative Caucus and California Attorney General Kamala D. Harris. The law also allows the state courts to provide the basis for the federally granted status necessary for expedited naturalization. A government official recently acknowledged that roughly 70 percent of immigrant families released into the United States never showed up weeks later for follow-up appointments with immigration agents.

Before it subsided, the surge of undocumented immigrants earlier in the year prompted national controversy. The federal government searched for places to house the immigrants while state governor after governor criticized the administration as, among other things, lacking in transparency.

From Jan. 1 through the end of August, more than 43,400 undocumented children were released to sponsors, where they awaited legal processing, according to the government data mapped above. Sponsors in California received 4,680 undocumented children, or more than 1 in 10 of the national total. Almost exactly half of the minors were released to sponsors — who are typically relatives — in Los Angeles County.

Just about 3 in 4 undocumented children crossing the Southwest border come from El Salvador, Guatemala or Honduras, often to escape threats of murder, rape or other violence. Honduras is the murder capital of the world.

In June, New York City became the first city in the nation to provide lawyers for low-income immigrants facing deportation, the Christian Science Monitor reported at the time.