LOS ANGELES (AP) — Mexico's president spoke of the need for U.S. immigration reform on a two-day visit to immigrant-friendly California, saying those who reject diversity and inclusion will ultimately be proven wrong.

"We want to be a factor of cohesion, not division, with full respect for the sovereignty of the United States," President Enrique Pena Nieto said Monday. "This, at the end, is about — and only about — a matter of justice for those who contribute so much to the development of the American society."

Pena Nieto was welcomed by Gov. Jerry Brown, who played up his immigration credentials in a speech that highlighted the close cultural and historical ties they share across borders.

"It wasn't very long ago that the governor of California was outlawing driver's licenses for people who were undocumented from Mexico," Brown said. "That's not the law anymore."

Brown signed a bill into law last year that will enable immigrants to get driver's licenses next year. He said he got the message after a visit to a Monterey artichoke field where the workers yelled "licencia, licencia."

During an upbeat speech embracing the ties between Mexico and California, Brown didn't entirely gloss over a relationship that has, at times, been fraught with tension and he referred to past ethnic problems.

California voters in 1994 passed Proposition 187 that sought to ban immigrants who are in the country illegally from access to social services including health care and education, though it was reversed by the courts.

Hispanics have now become a force to be reckoned with in California. They now make up the largest of any racial or ethnic group in the state, though their voter registration numbers still lag behind whites.

On Tuesday, Brown will host a luncheon in the president's honor in Sacramento. Pena Nieto will then address the Legislature at the state Capitol.

Brown invited Pena Nieto to California after visiting Mexico last month and signing nonbinding agreements on trade, education and environmental cooperation. The two politicians, Mayor Eric Garcetti and community leaders addressed hundreds of enthusiastic Mexican and Mexican-American leaders at the Millennium Biltmore Hotel in Los Angeles.

Pena Nieto criticized unethical governors who had cracked down on immigrants, though he didn't name any specifically.

"There are still states that have not evolved so much as California, that still skimp on recognition and, even worse, the rights of immigrants," he said. "Those who still believe and bet for the exclusion and discrimination or the rejection of diversity ... I only have one thing to say: the future, and a very near future, will demonstrate your ethical mistake. Time will show we're right."

Raúl Hinojosa, a professor of Chicano Studies at University of California, Los Angeles, said the visit was important during the impasse in reaching an agreement in immigration reform because it showed the cooperation between the governor of the largest state, the mayor of the second-largest city and the president of the nation that provides the most migrants.

"There's a positive way forward, in terms of working collectively, specifically, on the issues of human rights and immigrant rights on both sides of the border," Hinojosa said.

Brown made passing references to his trade mission to Mexico and the areas he agreed to work on, including efforts to help Mexico build renewable energy plants in Baja California and to find ways to shorten long waits at the Tijuana-San Diego international border crossing.

"If we can put a man on the moon, we can put a man from Mexico to California in 20 minutes," Brown said to laughter and applause.

There is no grievance that is a fit object of redress by mob law.--January 27, 1838 Lyceum Address

Don't interfere with anything in the Constitution. That must be maintained, for it is the only safeguard of our liberties. And not to Democrats alone do I make this appeal, but to all who love these great and true principles.--August 27, 1856 Speech at Kalamazoo, Michigan

Let us then turn this government back into the channel in which the framers of the Constitution originally placed it.--July 10, 1858 Speech at Chicago