The immigration issue is a highly charged one in the US
Illegal immigration is a deeply divisive issue in the United States. For the past two years, Congress under Republican and now Democratic control has been trying to carry out a comprehensive overhaul of immigration law.
Reform efforts stalled in 2006 against a background of protests by pro-immigration groups and calls by opponents for a toughening of the rules.
Renewed attempts this year to pass legislation appear to have also failed, making it unlikely that any reform will be enacted during the rest of President George W Bush's term in office.
How big is the problem?
There are thought to be about 12 million illegal immigrants in the United States, and each year some 500,000 to a million more enter the country, mostly through the 2,000-mile (3,200-km) southern border with Mexico.
Many of these people are poorly educated, unskilled workers, yet in their thousands they fill the sort of jobs that most native-born Americans will not take, at least not for the same price.
Much of California's agriculture relies on migrant labour, for example. But some argue these jobs could be filled even without illegal immigrants.
Most people agree that - at present - the US system is failing all its stakeholders: foreigners who want to enter the country, citizens who expect it to prevent illegal border crossings and employers who look to it for workers to fill jobs.
Why is the debate so charged?
Polls suggest that a majority of Americans see illegal immigration as a serious problem for the US.
However, many immigrants already in the country, both legally and illegally, have voiced opposition to moves to restrict immigrants' rights or prevent a "path to citizenship".
Strength of feeling on the issue was illustrated in 2006, when more than a million people boycotted work and turned out at May Day protest rallies across the country.
This year's rallies attracted fewer people, which organisers said was partly because recent crackdowns on illegal immigrants had made some people wary of taking part.
Opposition to illegal immigration has been reflected in the emergence of Minutemen groups - citizens who have taken it upon themselves to patrol the US borders and to confront illegal workers in cities around the US.
The issue is also politically awkward for President Bush's Republican party, because it brings into conflict two of its core constituencies - social conservatives and the business lobby.
It has also exposed rifts within Democratic ranks with some arguing along with their trade union allies that guest worker programmes would depress wages and threaten American employees.
Several players in the immigration debate are contenders for the White House in 2008. Neither political party wants to alienate the growing Latino electorate.
What are the key issues?
The political debate over immigration reform has crystallised around several key issues.
These include the enforcement of the country's land borders and existing laws on immigration, changes in the law to deal with people already in the country illegally, and how to offer a regulated route into the US for what the business community says are much-needed workers.
Some advocate greatly expanding physical barriers, like fencing, that already exist along some 100 miles of the US-Mexican border near cities - and bringing in tougher penalties for businesses caught employing illegal migrants.
In 2006, Mr Bush signed into law plans for a 700-mile (1,125km) fence along the border despite strong objections from the Mexican government.
Plans for various guest worker programmes, and provisions allowing the millions of illegal immigrants already in the US to remain legally, have been the subject of hot debate.
What stage is Congress at?
White House officials and key senators in both parties reached agreement in May 2007 on proposals that could have given legal status to many of the illegal immigrants already in the US.
But the bipartisan compromise unravelled in the Senate in June amid lengthy debate and a raft of amendments.
After failing to have the measure put to a final vote, largely because very few Republicans supported it, Senate Majority Leader Harry Reid removed the proposal from business.
There followed further negotiations and a personal appeal by Mr Bush to Republican leaders.
But on 28 June the Senate refused to end debate and advance the legislation. Senators in both parties said the issue was so charged it was unlikely to be reconsidered later this year or next year, given that the presidential election campaign will be dominating the political scene.
Awaiting Senate action, the House of Representatives has not this year considered its own version of the legislation.
What were the key elements of the bill?
Illegal immigrants who were in the US as of 1 January 2007 would be able to come forward and claim a new "Z visa". After paying a fine and fees, they would be able to embark on a path to permanent residency or citizenship, which would take several years.
For the first time, a "merit-based" system based on skills and education would outweigh family connections in deciding whether to give people permanent residency.
A temporary guest worker programme would allow people to come to the US to work on short-term visas, which could be renewed only twice. The latest amendment to the bill means this programme will end after five years.
The visa and guest worker programmes would only come into force once certain security measures were in place. These included deploying extra border agents, building and reinforcing border fencing, and high-tech verification checks to ensure workers are in the country legally.
What happens next?
Given the tight political timetable, it seems unlikely lawmakers will return to comprehensive immigration reform before the November 2008 presidential election.
Any legislation agreed in the Senate would have to be reconciled with the House of Representatives' version of the bill, and ultimately sent to the president to be signed into law.