WASHINGTON - The bipartisan coalition behind a contentious overhaul of immigration laws stuck together on a series of test votes Thursday, turning back challenges from conservative critics as the Senate Judiciary Committee refined legislation to secure the borders and grant eventual citizenship to millions living in the country illegally.

In a cavernous room packed with lobbyists and immigration activists, the panel rejected moves to impose tougher conditions on border security before those who entered the country illegally could take steps along a new pathway to citizenship.

Republicans Lindsey Graham of South Carolina and Jeff Flake of Arizona - part of a bipartisan group that helped draft the measure - joined all 10 Democrats in blocking the changes. Sen. Orrin Hatch (R., Utah), who has yet to announce a position on the overall legislation, opposed one and supported the others.

Assuming the core political alignment remains intact, the committee is expected to approve the measure within two weeks and clear the way for an epic Senate showdown in June.

White House aides watched from the sidelines as the committee began its work on a bill that President Obama has made a top priority in the opening months of his second term.

Painstakingly negotiated by a bipartisan "Gang of Eight," the measure would clear the way for tens of thousands of new high-tech and lesser-skilled workers to enter the country while also requiring all employers to check the legal status of their employees. But it was the core trade-off - securing the border against future illegal immigration while setting up a 13-year process by which immigrants unlawfully in the country could qualify for citizenship - that generated the most controversy by far.

Sen. Charles E. Schumer (D., N.Y.), who helped draft the bill, said it would "change our policy so that the people who are needed to help our economy grow can come into this country, and at the same time we will note that when families are divided the humane thing to do is bring those families back together."

Republican critics made no claim they can defeat the bill in committee and concentrated instead on casting doubt on assertions that it will secure the U.S.-Mexican border before it allows a new path to legal status.

"The triggers in the bill that kick off legalization are weak," said Sen. Charles E. Grassley of Iowa, referring to a series of requirements that must be met before unauthorized immigrants can apply for legal status. "No one can dispute that this bill is legalization first, enforcement later."

The first challenge to the legislation came on Grassley's proposal to require six months to elapse between the time the southern border is secured and immigrants may begin seeking legal status. The second, advanced by Sen. Mike Lee (R., Utah), sought to require that both houses of Congress vote to declare the border secure before the citizenship process could begin. Also rejected was Sessions' call for 700 miles of double-fencing along the Mexican border.