U.S. Sen. John McCain, R-Ariz., listens to a question during a town hallFeb. 19, 2013, in Sun Lakes, Ariz. McCain defended his proposed immigration overhaul during the session. (Matt York/AP)

President Obama understands Republican concerns about the need to link improved border security to changes in immigration law, two key Republicans involved in the effort said Tuesday after a White House meeting with Obama.

Sens. John McCain (Ariz.) and Lindsey O. Graham (S.C.) said they covered a variety of topics in the unusual meeting with Obama, including a robust discussion of how to reshape the nation’s immigration laws.

The GOP duo — members of a bipartisan group of eight senators working to write an immigration bill for introduction in March — emerged with strong praise for Obama’s leadership and optimism for the fate of the effort.

“It was one of the best meetings I’ve ever had with the president,” Graham said. “I think the president’s very sincere in wanting a bill and wanted to know what he could do to help.”

According to a joint statement of principles issued by the Senate group last month, illegal immigrants would be able to quickly seek temporary legal status after passage of possible legislation. But they would not be able to seek permanent residency until the border is more secure.

Republicans have said the linkage is key to a bipartisan agreement, although it worries immigrant advocates. Obama has presided over a record number of deportations during his time in office.

McCain and Graham said after Tuesday’s meeting that they believe Obama understands GOP concerns about the border.

“He understands that we need border security that we can afford,” Graham said. “Sen. McCain made a strong point about the border. The president understands the working components of it.”

White House officials did not respond to requests for comment.

The meeting represented an unusual outreach from Obama to rank-and-file Republicans. It grew out of phone calls Obama placed to the two senators last week, along with a call to Sen. Marco Rubio (R-Fla.).

Some Republicans had said they doubted the president’s commitment to a bipartisan process after the draft of a separate White House bill was leaked to the press. Obama has said the bill is merely a fallback in case the Senate talks falter.

The White House meeting could be an attempt to quiet criticism from the Hill, where lawmakers in both parties have long griped that they rarely hear from the president.

McCain and Graham have also been warning publicly about the impact on national defense of allowing $85 billion in spending cuts to take effect Friday. Neither would say Tuesday whether they discussed the looming sequester with Obama.

David Nakamura contributed to this report.

Discuss this topic and other political issues in the politics discussion forums.