WASHINGTON — The government of South Korea hired a former C.I.A. analyst, two White House veterans and a team of ex-Congressional staff members to help secure a few paragraphs in the giant immigration bill.

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.