The government of Ireland, during St. Patrick’s Day festivities, appealed directly to President Obama and Congressional leaders for special treatment. And the government of Poland squeezed Vice President Joseph R. Biden Jr. and top lawmakers on Capitol Hill for its own favor, a pitch repeated at an embassy party last week featuring pirogi and three types of Polish ham.Those countries, and others, succeeded in winning provisions in the fine print of the 867-page immigration bill now before Congress that give their citizens benefits not extended to most other foreigners.Ireland and South Korea extracted measures that set aside for their citizens a fixed number of the highly sought special visas for guest workers seeking to come to the United States. Poland got language that would allow it to join the list of nations whose citizens can travel to the United States as tourists without visas. And Canadians successfully pushed for a change that would permit its citizens who are 55 and older and not working to stay in the United States without visas for as much as 240 days each year, up from the current 182.South Korea alone has four lobbying firms in the campaign, paying them collectively at a rate that would total $1.7 million this year, according to required disclosure reports. Other nations generally relied on their own ambassadors and embassy staff to make the push, meaning there is no way to track how much has been spent on the effort.The deals are already drawing some criticism, particularly from those who worry that some of the provisions — in addition to already increased annual visa allotments available generally — could create an influx of foreigners large enough to undermine American workers.“This could turn into a stealth immigration policy,” said Ronil Hira, a professor of public policy at the Rochester Institute of Technology who studies the immigration system. “Every country is going to try to negotiate its own carve-out.”Indeed, lawmakers are already pushing to grant special benefits to other places, including Tibet, Hong Kong and parts of Africa.Advocates of the measures say they serve American interests. Loosening the tourist visa requirements, for example, would result in hundreds of thousands of additional visitors spending billions of dollars each year, supporters say.Senator Charles E. Schumer, a New York Democrat who was responsible in part for inserting the measures affecting Poland, Canada and Ireland into the legislation, defends them. “Each of these provisions makes individual sense on the merits,” a spokesman for the senator said. “They each solve inequities in the existing immigration law.”The proposed foreign deals have drawn little scrutiny, but Senator Charles E. Grassley, Republican of Iowa, and his staff are starting to raise questions about some of them, saying Americans deserve to fully understand what is in the huge immigration package. “I plan to ask many questions throughout this process,” Mr. Grassley warned during a Senate Judiciary Committee meeting on Thursday.Some diplomats who worked for the carefully devised benefits had hoped to avoid such attention. “If we could stay below the radar, we would much prefer it,” one senior official at an embassy in Washington said on the condition of anonymity.Most of the language in the immigration package, created by a bipartisan group of eight senators, applies equally to citizens of any foreign nation. It calls for tougher border security and a pathway to citizenship for millions of illegal immigrants in the United States. It also increases the number of visas for high-skilled workers to at least 110,000 annually from the current 65,000 and eases the way for those already here to seek a permanent resident visa, known as green card. With uncertain support in the Senate and tough opposition in the House, the fate of the bill is far from clear.But with access to the United States a prize coveted across much of the world, the push for special favors has been intense, according to Congressional and Justice Department records.An Irish-American group, working with the Irish Embassy, hired former Representative Bruce Morrison, Democrat of Connecticut, to help push its cause, arguing that changes in immigration law decades ago created an unfair barrier to citizens of Ireland in gaining access to the United States.In 1990, he inserted a provision, since named the Morrison Visa, into immigration legislation that temporarily gave special preference to citizens of Ireland and a small number of other nations. The current proposal would allow work visas for 10,500 Irish citizens annually who are high school graduates, an unusual opportunity, since such visas are generally reserved for foreigners considered “high skilled.”Prime Minister Enda Kenny of Ireland joined the effort, making the case with President Obama at St. Patrick’s Day events in Washington.Lobbyists working for South Korea — including Brian D. Smith, a White House aide during the Clinton administration; Scott D. Parven, a former Senate aide; Kirsten A. Chadwick, a Bush White House aide; and Jonathan R. Wakely, a former C.I.A. political analyst — made dozens of calls and visits to Capitol Hill in recent months to push for a special “professional visa” for its citizens, focusing on central players on the House and Senate Judiciary Committees, the Justice Department records show.The lobbyists or the political action committees run by their firms have also made campaign donations to lawmakers who support their cause, in some cases just weeks before the helpful language was introduced, campaign finance records show. Foreign officials are prohibited by law from contributing to American political campaigns.President Park Geun-hye of South Korea, on her first official visit to Washington last week, pressed Mr. Obama and lawmakers to preserve the language in the immigration legislation that would designate at least 5,000 special work visas for South Koreans, or pass an even more generous stand-alone bill introduced last month, which would create 15,000 such visas annually.The South Korean government has said the provision is a necessary companion to the free trade agreement both nations ratified in 2011, so that highly skilled workers can move back and forth between the two countries freely. Australia received a similar deal in 2005 after it negotiated its own free trade pact.“If the bill on visa quotas for Korean professionals is passed in this Congress, both our economies will benefit, for it would help create many more jobs,” Ms. Park said in an address to Congress on Wednesday. She followed up by soliciting help from American corporations at a luncheon hosted by the U.S. Chamber of Commerce.Senator Jeff Flake, Republican of Arizona, has been the leading proponent of South Korea’s request on the Senate side, while Representative Peter Roskam, Republican of Illinois, is leading the effort in the House. “It allows the free trade agreement to flourish and meet its potential,” said Mr. Roskam, who sat next to Ms. Park at a dinner hosted by the South Korean embassy last week.The Poles made their pitch at Ambassador Ryszard Schnepf’s residence on Tuesday, where hundreds of Polish diplomats, military personnel and prominent Polish-Americans joined at least half a dozen members of Congress and the guest of honor, Mr. Biden. (He joked that some in his home state, Delaware, called him “Joe Bidenski.”)Poland wants the United States to revamp the rules that allow foreign nations to become eligible for the so-called visa waiver program, letting tourists visit the United States without having a formal interview at embassies overseas.Poland has been unable to qualify because too many of its citizens are rejected when they apply for visas — an indicator that they might try to fraudulently use a tourist visa to immigrate to the United States.The effort to revise the rules has support from the White House and groups that promote tourism in the United States. The provision could also benefit 10 or so other countries, including Argentina, Brazil and Israel.But Jess T. Ford, who examined border security issues for the Government Accountability Office until 2011, said the change could create a loophole leaving the United States vulnerable to increased illegal immigration, at least until the United States sets up a long-delayed system to monitor visitors when they exit, not just when they arrive.“Once somebody comes in here as a tourist, you can’t keep track of them,” Mr. Ford said in an interview.So far, Obama administration officials and backers of the measure in Congress say they are confident that simplifying the tourist entry process will not create such a problem, as an exit-tracking system is promised as part of the package. It is a position that the lobbying team pushing for the change considers good news.“I am confident, Mr. Vice President, that with your help, we will get this issue across the finish line,” Ambassador Schnepf told Mr. Biden last week, drawing applause and cheers.