Updated

After meeting with Mexican President Enrique Peña Nieto, U.S. Sen. John McCain said Friday that he and other lawmakers working on an immigration overhaul will meet with President Barack Obama on Tuesday to discuss the effort to revamp the system.

McCain, a member of a bipartisan group of eight senators working on a bill, said there is still significant disagreement with the president, but he is optimistic about producing legislation that includes a path to legalization for illegal immigrants.

The White House could not immediately confirm the Tuesday meeting.

"The president of the United States has supported our efforts. In fact we will be meeting with the president on Tuesday," McCain said during his visit to Mexico.

He did not say how many senators would attend the meeting.

Asked about the prospects for reaching a deal, he said: "I am guardedly optimistic that we could by the end of the next month. There's still a number of agreements that need to be made before I can assure you that we will have a resolution."

While they differ on some key details, both Obama and the Senate are contemplating legislation that would provide a pathway to citizenship for most of the 11 million illegal immigrants already in the U.S., tighten border security, crack down on businesses that employ illegal workers and strengthen the legal immigration system.

McCain ticked off those aspects and added that he also envisions the legislation including a process for foreign agricultural and low-skilled laborers to work in the United States, a provision for highly educated workers to remain in the U.S., better identification cards for migrants and a special path for migrants brought to the U.S. as children.

"On some of those we have specific agreement, in other areas we agree in principle, but we have not resolved the details," he said. "We are making progress, but we are still not at a point where we can say we will succeed."

The meeting marks Obama's most direct involvement to date in negotiations by the bipartisan group of senators working to craft comprehensive immigration reform legislation. Wary of making it harder for Republicans to support an eventual bill by embracing it too closely, Obama has instead kept his distance.

The White House is prepping its own bill, but says it's just a backup in case congressional talks fail.

"It is, by far, the president's preference that the Senate process move forward, that the bipartisan group of eight have success, and that they produce a bill that wins the support of Democrats and Republicans in Senate," White House spokesman Jay Carney said this week.

The risks for Obama in getting too close to the process were on full display earlier in the week when details of Obama's draft bill were leaked, prompting concerns among some in Congress that the competing bill would make it harder for senators to strike a bipartisan deal. Florida Sen. Marco Rubio, a key Republican member of the group, said Obama's plan had "injected additional partisanship into an already difficult process."

But Senate aides said privately that bipartisan negotiations were in a good place and they did not feel as though the disclosure of details in Obama's draft bill had disrupted their process.

Turning to Mexico, McCain said Peña Nieto had reassured him that Mexico would continue to battle drug cartels while reassessing the country law-enforcement strategy.

The Mexican administration that took office Dec. 1 has, at least in its public rhetoric, emphasized social programs and economic growth as the answer to drug crime, a change from the previous government's focus on a militarized offensive against cartels. That has provoked concern in Washington about a reduction in anti-drug cooperation with Mexico.

"I have no doubt about his commitment," McCain said of Peña Nieto. "I think he feels that policies and practices of the previous administration need to be examined."

McCain said the Mexican president had emphasized the need to reinforce Mexico's southern border with Guatemala, a new emphasis in a relationship that has focused heavily on the U.S.-Mexican border.

The Mexican government said Peña Nieto "emphasized the necessity and the benefits of diversifying the agenda and the dialogue between Mexico and the United States," to focus on economic issues including the automotive industry and educational, scientific and technological cooperation.

Peña Nieto's government is in the midst of an international and domestic public relations campaign to undercut Mexico's association with drug crime and promote its relatively strong economic growth, driven partly by foreign investment in manufacturing plants here.

Based on reporting by The Associated Press.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino