For most presidential candidates, getting on the New Hampshire ballot is a fairly straightforward affair: Show up at the State House, bring $1,000 to cover the filing fee, and sign a form affirming you’re registered with your chosen political party.

For Bernie Sanders, that last part has proven slightly more complicated.

One of the very same credentials that Sanders has touted as a point of pride — his status as the “longest-serving independent” in Congress — has the potential to throw a wrench in his New Hampshire primary plans.

Reading this story on your iPhone or iPad? Download NHPR's new State of Democracy app and stay connected to the stories that matter from the 2016 campaign trail. Click here to get the app.

Those who file to run for president in New Hampshire are essentially reserving a spot on the ballot for one of the recognized political parties — at this moment, the only two recognized by the state are Republicans or Democrats. When undeclared (or “Independent”) voters show up at the polls, they choose which party’s primary they want to participate in and are given one of the available ballots.

Sanders and his supporters have mostly brushed aside questions about any potential threats to his place on the New Hampshire ballot, which requires candidates to declare that they are a “registered member” of either the Republican or Democratic party. That said, the campaign has been bracing for the possibility — however slim — of being blocked.

So when Sanders shows up to the Secretary of State’s office Thursday afternoon to file for the primary, he’ll be escorted by New Hampshire Democratic Chairman Ray Buckley and prepared for a potential challenge to his eligibility.

“I will be with Sen. Sanders when he files in case there is any discussion to handle it right then and there,” Buckley told NHPR Monday.

Andru Volinsky, a Manchester attorney who's served as Sanders' New Hampshire campaign counsel since August, also intends to be there — he’s been advising Sanders’ team on questions about ballot eligibility, among other issues. Volinsky pointed to several credentials in making the case that Sanders can safely declare allegiance to the Democrats when he files.

“The senator considers himself presently to be a Democrat. He is nominated as a Democratic presidential candidate in his home state already, and he is recognized by the state parties and the national parties to be a Democrat,” Volinsky said Tuesday night. “All of those give the campaign confidence that he is appropriate and will be listed on the ballot as a Democrat in New Hampshire.”

New Hampshire spokesman Karthik Ganapathy also pointed out that Sanders has received the Democratic Party’s endorsement in his home state during past campaigns and regularly caucuses with Democrats in the U.S. Senate.

“Bernie Sanders has been as active a participant in the Democratic Party as anyone,” Ganapathy said.

While Sanders’ team is staying optimistic — at least outwardly — that it wouldn’t come down to this, Volinsky did say the campaign is prepared to defend any legal challenge that might arise when Sanders files for the ballot this week.

“The campaign is very committed to Sen. Sanders being on the ballot in New Hampshire and will take all appropriate steps to ensure that happens,” Volinsky said.

“The campaign has taken a very thoughtful approach to a number of areas, one of which is a potential legal challenge,” Volinsky later added. “With the kind of care they’re spending on getting Bernie in front of crowds, they’re being as careful about being on the ballot in states that are now coming up as primary states.”

The questions about the Vermont senator’s eligibility in New Hampshire have been looming for nearly as long as he’s been in the race. Several days after he announced his intent to run for president, CNN published a story floating this very issue: “Potential roadblock for Bernie Sanders rises in New Hampshire.” Similar reports have been trickling out in the months that followed.

All the while, Sanders and his supporters — and Buckley, as the state party chairman — have remained adamant that Sanders will make his way onto the state’s Democratic primary ballot.

One key player who's been less forthcoming, however, is Secretary of State Bill Gardner — the man who will have a first pass at approving or denying Sanders’ registration.

Gardner, when asked by reporters in recent months, has been reluctant to speak directly to the senator’s eligibility. He has instead opted mostly to respond with broad statements about the procedures around the filing process. Gardner was not available for comment when contacted Tuesday, the day before the filing period opens.

"If they're going to run in the primary, they have to be a registered member of the party," Gardner told CNN when first asked in April. "Our declaration of candidacy form that they have to fill out says 'I am a registered member of the party.' "

“When someone files, we accept the filing as truthful,” Gardner told the Concord Monitor in May. “If we are presented with factual information to the contrary, then we will deal with that.”

"Whenever the question has come up, there was some way to usually show the person has been on the ballot of that party," Gardner told NPR in June. "I really don't know."

Despite the lingering uncertainty from the Secretary of State’s office, Buckley was as confident as ever when asked earlier this week about the filing process that awaits Sanders. The party chairman has consistently stated plans to defend Sanders’ place on the ballot. Last month, Buckley released a letter addressed to the Secretary of State explaining that the state party “considers Senator Bernie Sanders to be a member of the Democratic Party.”

And, for now, the view from the campaign remains similarly bullish on the issue.

“I would not say the campaign is overly concerned,” Volinsky said. “The campaign is confident that he’ll be on the ballot and the hope of the campaign is that this is a discussion of ideas and solutions for the country, and being on the ballot is just one of the precursors to joining the discussion.”