Voters in North Dakota approved a ballot measure that sets a maximum age for representing the state in Congress, The Associated Press said on Tuesday. Experts said they believed North Dakota was the first state to impose such a requirement on members of Congress, though they said the measure is likely to be challenged in court.

The ballot measure, to amend the North Dakota Constitution, bars congressional candidates who would turn 81 or older by the end of the year before their term ends from being eligible for office.

The measure provided a rare glimpse into how one state’s voters think about age at a time when questions over the effectiveness of older political leaders have been part of the national conversation.

The campaign in North Dakota to pass an age limit on the state’s members of Congress began as many Americans have debated whether age ought to be a factor in this year’s presidential contest. President Biden is 81, and his opponent, former President Donald J. Trump, is 77.

As a practical matter, the rule does not pose a threat to the state’s three current federal lawmakers, all Republicans, who range in age from 47 to 67.

Jared Hendrix, 41, a Republican politician from Fargo who led the effort to put the question on the ballot, said he saw it as an opportunity to elevate the debate about whether older politicians can govern effectively.

“I think it’s very possible that if we pull this off here, other states will follow,” he said before the election.

In 2022, Mr. Hendrix led a successful effort to set term limits for governor and state legislators.

North Dakota lawmakers anticipated that the new measure would be challenged in court if approved. A Supreme Court case in 1995 established that states cannot add eligibility restrictions beyond those in the Constitution. The Constitution establishes age minimums to serve in Congress — 25 in the House and 30 in the Senate — but federal lawmakers may serve as long as they continue winning races.