California will spend $3 million to provide legal representation for unaccompanied immigrant children from Central America who have arrived in the state, under a bill signed into law on Saturday by Governor Jerry Brown.

With the measure, California becomes the only U.S. state along the Mexican border to provide special funds for the legal representation in federal immigration court of children from an influx of unaccompanied, Central American minors who began crossing the border last year.

Under the law, money will be given to nonprofit organizations to provide the legal services. Last month, the bill passed the state Assembly by a vote of 56-21 and then the state Senate by 27-8. Both chambers are controlled by Democrats.

When the bill was introduced, Brown, a Democrat, said helping the unaccompanied minors navigate immigration courts was "the decent thing to do" and consistent with the "progressive spirit of California."

A yearlong surge has brought about 63,000 unaccompanied children to the southwestern U.S. border, leaving President Barack Obama and his administration grappling for ways to handle the influx and stem the flow of children and families trying to get into the country. Several thousand of the children were sent to California.

The number of unaccompanied minors crossing into the country dropped over the past summer, U.S. Homeland Security Secretary Jeh Johnson said this month.

Unlike child immigrants from Mexico, who can be swiftly sent back to their country, U.S. law requires unaccompanied minors from Central America to have their cases heard by an immigration judge.

After their release from detention, the Central American children can be placed with a relative or sponsor and are instructed to go through immigration proceedings, during which they face a possible deportation order.

The U.S. Justice Department and the group that administers the AmeriCorps national service program awarded $1.8 million in grants this month to enroll about 100 lawyers and paralegals to provide legal services to unaccompanied minors in immigration proceedings.

But groups including the American Civil Liberties Union are pursuing a lawsuit filed in July that accuses the federal government of not providing legal representation to the minors. The groups have argued in legal papers that the federal government's plan to underwrite the cost of representing some minors is too limited.

(Reporting by Alex Dobuzinskis; Editing by Peter Cooney)