The law also eliminated a program in which teenagers filled out their voter-registration forms early and were automatically registered when they turned 18.

“For people like me, it makes what should be a simple process very difficult,” said Josue Berduo, 20, an economics major at North Carolina State University and a Democrat who is one of the plaintiffs.

Mr. Berduo, who is from Asheville, N.C., has a state identification card. But many students do not, he said, and no matter how much attention the law gets, some students will be unaware of the changes and will arrive at polling places carrying out-of-state licenses or student identification cards.

Jeff Tarte, a Republican state senator who supported the voter-ID law, said lawmakers did not intend to keep younger voters away from the polls. He said they were trying to prevent students from submitting absentee ballots in their home states and also voting in North Carolina. “Not that they would necessarily,” he said, “but why even offer that possibility to occur?”

But it is hard to separate the voting rights battle from the larger political struggle that has been underway in North Carolina since President Obama carried the state in the 2008 election and Democrats trumpeted it as evidence the state was turning blue. A Republican resurgence in the years since has resulted in, among other things, a deeply conservative legislature and a Republican governor, Pat McCrory, and has made Kay Hagan, a Democrat, one the United States Senate’s most endangered incumbents in this fall’s election.

Nationally, voters under the age of 30 represent a big voting bloc. They cast more than 20 million votes in the 2012 presidential election, accounting for about 15 percent of the total, according to the Center for Information and Research on Civic Learning and Engagement, a nonpartisan center at Tufts University. And in North Carolina, their turnout in 2012 was about 57 percent, among the highest in the country.

In both that election and in 2008, the Obama campaign pushed hard to register student voters, and the payoff was clear. In 2008, that age group voted so overwhelmingly for Mr. Obama that he became the first Democratic presidential candidate in a generation to carry the state, though he lost every other age group. Four years later, young voters helped keep the election close, though Republican Mitt Romney carried the state.