WASHINGTON — The Senate turned back an early attack on the broad immigration overhaul Tuesday, keeping alive a temporary worker provision that could bring in as many as 600,000 foreign laborers each year.

Senators voted 64-31 to reject a proposal offered by Sen. Byron Dorgan, D-N.D., and supported by some labor unions to delete the program, which is one of the measure’s key elements.

The vote was the first big test for the improbable coalition that wrote the measure and is struggling to keep the fragile deal from unraveling under pressure from across the political spectrum.

The bill still faces myriad assaults, including further Democratic attempts to limit or alter the temporary worker program, which would bring in foreign employees on two-year visas.

The bill would also toughen border security, give quick legal status to the estimated 12 million immigrants in the country unlawfully and create a new workplace verification system to bar undocumented workers from getting jobs.

It would create a point system for future immigration applicants that would place less emphasis on family connections and more on education and skills in demand by U.S. businesses.

Republicans were considering efforts to strengthen the bill’s security measures and make it more difficult for illegal immigrants to get on the path to citizenship.

Democrats were eyeing changes that would ensure more visas would be available for family members of permanent residents or U.S. citizens.

Conservatives, liberals and centrists who worked out the White House-backed deal are struggling to keep the bill intact while giving Democrats and Republicans who harbor grave concerns about it opportunities to make revisions.

Coalition members meet each day to decide which proposed changes are deal-breakers to what they call their “grand bargain.” Dorgan’s was considered one such poison pill.

The temporary worker plan has come under attack from several fronts. It would allow most of the workers — largely unskilled, nonagricultural workers in areas such as construction, landscaping and meatpacking — to stay for up to three two-year stints, provided they left the United States for a year between each stay.

Many labor unions say that would depress wages and create a class of workers with no job rights. Business groups call the leave-and-return element unworkable. Hispanic advocacy organizations and religious groups say it unfairly denies workers the chance to stay in the U.S. and ultimately gain citizenship.

“It is just a fiction that these are jobs Americans aren’t willing to do,” Dorgan said. “The main reason that big corporations want a guest worker program is that it will drive down U.S. wages.”

Dorgan’s was just one of a host of modifications senators are seeking to the broad immigration plan, a measure that evokes strong emotions among the public. Aware of the potent crosscurrents on the issue, leaders have abandoned an effort to speed the measure through the Senate this week, and now plan a final vote in June.

Democrats and Republicans are to take turns offering amendments, a process expected to last all week and resume after next week’s Memorial Day recess.

“There’s good and bad in this,” Senate Majority Leader Harry Reid, D-Nev., said of the bill. “That’s what amending the legislation is all about — trying to improve it.”

Sen. Jeff Bingaman, D-N.M., plans to offer an amendment to slash the number of annual visas available for temporary workers to 200,000. A similar proposal passed the Senate last year by an overwhelming margin.