For eight years, hundreds of graduate students at New York University have been at war with the school’s president, John Sexton, over his 2005 decision to stop recognizing the labor union that once represented more than 1,000 of the university’s graduate teaching and research assistants.

But N.Y.U. and the union for those graduate assistants, an arm of the United Auto Workers union, announced on Tuesday that they had reached an agreement under which the university would again recognize and bargain with the U.A.W. if a majority of graduate assistants vote in favor of having a union.

The U.A.W. and graduate teaching and research assistants hailed the accord because the university pledged that it would not campaign against the unionization effort and would allow for a quick election. Some 1,200 graduate assistants at N.Y.U. and the Polytechnic Institute of N.Y.U. in Brooklyn are scheduled to vote on Dec. 10 and 11 on whether to join the union, which represents thousands of white-collar workers across the country.

In a joint statement, N.Y.U. and the union said, “We are confident this agreement will re-establish a trusting and productive relationship between the union and the university, will improve the graduate student experience, and will sustain and enhance N.Y.U.’s academic competitiveness.”