President Obama met with a group of labor leaders Tuesday to discuss issues including immigration reform and a guest-worker program. (Alex Wong/GETTY IMAGES)

The Obama administration is trying to broker a deal between business and labor leaders over a controversial guest-worker program for foreigners, resolving a long-standing sticking point that has created political peril for President Obama in the past.

In the 2007 debate over immigration reform, Obama — then a senator from Illinois — voted for an amendment backed by labor unions that would have phased out a guest-worker program after five years. That amendment passed by a single vote, but some Republican leaders now say the measure helped kill broader reform legislation.

The White House is treading cautiously, sensing that business and labor leaders are closing in on an agreement that would make the two sides powerful allies in Obama’s push to overhaul the nation’s immigration laws this year. On Tuesday, the president met separately with representatives from both sides, hoping to marshal their support.

“We talked about a data-driven system that is actually driven by needs and not by aspirations of employers,” said AFL-CIO President Richard Trumka, who attended the meeting with labor leaders. “We talked about a fair system. . . . We’re working on it now. We’re hopeful.”

The behind-the-scenes negotiations come as the Obama administration faces a difficult path in shepherding a potential comprehensive immigration bill through the Democratic-controlled Senate and the Republican-led House. The effort could face serious obstacles, including disagreements over whether a plan should include same-sex couples or provide a path for citizenship for illegal immigrants.

In the first immigration hearing at the House Judiciary Committee on Tuesday, early partisan cracks emerged on issues such as a path to citizenship and a guest-worker program.

Rep. Raul R. Labrador (R-Idaho) said he is “dumbfounded” by opposition to a guest-worker program. But he said he opposes providing a path to citizenship as part of a reform package, as Obama and other Democrats favor.

The hearing was briefly interrupted by a knot of protesters shouting, “Undocumented and unafraid!”

In addition to determining how many visas would be granted to foreign guest workers, lawmakers will have to decide what rights those immigrants would have in terms of benefits and health care, and whether they would be able to apply for citizenship or be forced to return home.

The administration appears willing to let lawmakers and interest groups work out the details.

“We will look to the Senate to — or the Congress — to develop proposals on this issue if the Congress desires,” White House press secretary Jay Carney said last week. “And we would want to make sure that it protects workers, including immigrant workers, and that it is actually based on data-driven workforce demands, rather than political whim.”

Over the past several weeks, Trumka has been engaged in private talks with U.S. Chamber of Commerce President Thomas J. Donohue. Both have publicly supported other major tenets of immigration reform, including a path to citizenship for the more than 11 million illegal immigrants living in the United States.

But obstacles remain over the new guest-worker program sought by the chamber, which argues that businesses need maximum flexibility to hire foreign workers when there are not enough qualified or willing Americans to fill jobs.

A bipartisan Senate group developing immigration proposals has said it is open to a system in which foreigners would receive temporary visas to work in fields such as farming and high-tech engineering.

The chamber is pushing for a system in which additional visas would be granted when the U.S. economy was strong and unemployment low; the number would be reduced, sometimes significantly, if the unemployment rate rose.

“Current work visa laws contain arbitrary caps that have absolutely no connection to what’s happening in the real world,” Donohue said during a recent panel discussion on immigration at the National Press Club. “Outdated and overly restrictive visa polices are depriving America of both the high- and low-skilled workers that we need. We need a visa system tied to market demands.”

But the AFL-CIO is skeptical and has proposed creating a commission that would analyze the unemployment rate, regional economic conditions and industrial demands before setting and adjusting visa caps.

Heading into the White House on Tuesday, Steve Case, a co-founder and former chief executive of AOL, said he supports increasing the number of visas for highly skilled foreigners.

“I hope he says that he’ll approach comprehensive immigration reform with urgency and in a bipartisan way, and that it’ll include a strong high-skilled immigration component,” Case said of Obama.

In past debates, unions have clashed with one another on some issues. In 2007, the AFL-CIO split with another powerful labor group, the Service Employees International Union, which favored the Senate bill that included phasing out the guest-worker program after five years.

Eliseo Medina, secretary-treasurer of the SEIU, said his organization supported the bill only to get it into the House, where it could have been amended again.

This time, he said, labor is united.

“At that time, the Democrats were in charge. So we said, ‘If we stop it in the Senate, it’s not going to go anywhere,’ ” Medina said. “What happened was they killed it, and that was it. But this year, we’re on the same page.”

Rosalind S. Helderman and Philip Rucker contributed to this report.