MEXICO CITY, Oct 8 (Reuters) - U.S. Secretary of State Antony Blinken on a visit to Mexico on Friday held talks with President Andres Manuel Lopez Obrador, trying to mend fractious ties as the two nations hash out a new security cooperation accord and deal with a jump in migration.The top U.S. diplomat visits Mexico at a time when the Biden administration is increasingly reliant on its southern neighbor to stem the flow of Latin American migrants heading to the United States.Blinken's visit is part of the Biden administration's first U.S.-Mexico High-Level Security Dialogue, in which the two countries will negotiate a sweeping new agreement on how to tackle everything from drug flows to the United States to the smuggling of U.S.-made guns into Mexico.Lopez Obrador took Blinken on a mural tour of the National Palace before the two delegations had a working breakfast, where the Mexican leader invited U.S. President Joe Biden to visit.Blinken said Lopez Obrador's earlier comments were "exactly in line" with what Biden has in mind for the U.S.-Mexico relationship."I'm very inspired by the vision you expressed. The work now we have to do to translate that into reality, into truly a transformational partnership, a shared responsibility," Blinken said at the start of the breakfast meeting.U.S. Secretary of Homeland Security Alejandro Mayorkas and U.S. Attorney General Merrick Garland accompanied Blinken, who is also meeting with Foreign Minister Marcelo Ebrard.U.S.-Mexico relations suffered a major blow last October when U.S. anti-narcotics agents arrested Mexican former defense minister Salvador Cienfuegos, outraging the Mexican government. Cienfuegos was freed, but the detention strained relations and hurt security cooperation.U.S. officials are touting the new security accord as broader than the previous agreement, the Merida Initiative, under which the United States channeled about $3.3 billion to help Mexico fight crime.Launched in 2007, the Merida Initiative initially provided military equipment for Mexican forces and later helped train Mexico's security forces and the judiciary. But Lopez Obrador has been a vocal critic of the program, saying it was tainted by its association with previous governments and for financing security equipment in the 2000s.Mexican officials say the new agreement will likely focus on the exchange of information, the root causes of violence, and stemming the flow of U.S.-made guns to Mexico, a key point of concern for Lopez Obrador. read moreBut negotiating a new agreement will be painful. The United States wants a more muscular approach to battling drug cartels while Lopez Obrador prefers softer and less confrontational methods to fighting gangs, said Vanda Felbab-Brown, a security and foreign policy analyst."There is a minimal area of overlap," said Felbab-Brown, a senior fellow in the Foreign Policy program at the Brookings Institution, a Washington think tank. "The U.S. is in an awkward position here because the Lopez Obrador administration is very comfortable with ending security cooperation."What is more, the talks about the new security cooperation may be overshadowed by immigration concerns.A surge in the number of Haitian and Latin American migrants arriving at the U.S.-Mexico border plunged the Biden administration into another crisis last month and underlined Washington's reliance on Mexico to help stem the flow.Mexico's importance in managing immigration has given the Lopez Obrador administration leverage to pursue more independent policies in other areas, Mexican officials say privately.During the U.S. presidential transition early this year, Mexico made it tougher for American law enforcement agents to operate in the country. Mexico has also delayed visas for U.S. anti-narcotics officers, the U.S. media has reported.A senior Mexican security official said there was optimism about the new agreement on the Mexican side and there may be scope to review the restrictions imposed on U.S. agents operating on Mexican soil, but the conditions cannot return to how they were before Cienfuegos' arrest."I think part of the U.S. government knows that that's not possible," the Mexican official said.Reporting by Simon Lewis, additional reporting by Humeyra Pamuk in Washington Writing by Drazen Jorgic Editing by Leslie Adler and Alistair Bell Disclaimer: The views expressed in this article are those of the author and may not reflect those of Kitco Metals Inc. The author has made every effort to ensure accuracy of information provided; however, neither Kitco Metals Inc. nor the author can guarantee such accuracy. This article is strictly for informational purposes only. It is not a solicitation to make any exchange in commodities, securities or other financial instruments. Kitco Metals Inc. and the author of this article do not accept culpability for losses and/ or damages arising from the use of this publication.