Republican presidential candidate Donald Trump speaks to supporters during a campaign rally in Manassass on Dec. 2. (Alex Wong)

Donald Trump slammed the Republican Party of Virginia via Twitter on Sunday for its plan to require that 2016 primary voters sign a statement confirming they are Republicans.

Trump and others say the requirement could discourage independent and first-time voters from casting primary ballots in Virginia, where primaries are open to all registered voters.

According to some experts, the voter pledge has the potential to hurt Trump in particular, because his un­or­tho­dox candidacy has attracted voters disenchanted with traditional party politics.

“It begins, Republican Party of Virginia, controlled by the RNC, is working hard to disallow independent, unaffiliated and new voters. BAD!” Trump said in one of five tweets sent over several hours Sunday.

The Virginia GOP declined to respond and referred questions to a statement issued by party executive director John Findlay on Dec. 17, after the executive committee voted to require the nine-word pledge in the state’s March 1 primary. The pledge reads: “My signature below indicates that I am a Republican.”

Findlay called the requirement “a reasonable threshold” that was not intended to target a specific candidate or group of voters and was approved “with a simple goal: to ensure Republican voters select our Republican nominee in 2016.”

A different twist on the loyalty pledge came up in Virginia this summer, when the party considered forcing presidential candidates to sign a pledge promising they would support the party’s eventual nominee. That plan was later scrapped.

During the first Republican presidential debate, Trump declined to say he would support the party’s eventual nominee; he has since said repeatedly that he would do so.

The issue of a voter pledge has long divided the state party, which has struggled to find unity after activists helped Dave Brat topple House Majority Leader Eric Cantor in the summer of 2014.

Supporters say the statement is a way of ensuring Democrats and other non-Republicans cannot vote in Republican primaries to sabotage the process. Hard-core conservatives influenced by the tea party movement have tended to support the pledge, while moderate establishment Republicans generally do not.

Some have speculated that the pledge is a way to obtain a fresh list of Republican voters, and contact them. The statement asks for an email address but does not require it, party officials said.

Trump’s tweets left no doubt where he stands on the issue. “R.P. Virginia has lost statewide 7 times in a row. Will now not allow desperately needed new voters. Suicidal mistake. RNC MUST ACT NOW!” one tweet read.

Campaign manager Corey Lewandow­ski said Trump is urging the state party to abandon the requirement, which he sees as just one more hurdle for would-be voters.

“That’s a real problem for a party that wants to be inclusive instead of exclusive,” Lewandowski said. “We want to have as many people participate as possible, right?”

The party’s decision also has been questioned by at least one state lawmaker, Del. Robert G. Marshall (R-Prince William), who said Sunday that he fears it will discourage unaffiliated voters. “The pledge — frankly — to me, it inhibits building a broader base for the party,” he said.

But Del. David I. Ramadan (R-Loudoun) said he supports the party requirement. He responded to Trump with an angry tweet of his own: “Our party, our rules; your $$s and your bullying do not work in the Commonwealth. MORON!!”

In an interview, Ramadan said, “If Trump considers himself a Republican and his supporters consider themselves Republican, then what’s wrong with signing a pledge saying they’re Republican?”

Ramadan, who is from Lebanon, said he received thousands of tweets from Trump supporters in response to his message. Some, he said, attacked both his position and his heritage, using obscenity and insulting images.

“That is the discourse that Trump creates,” the lawmaker said. “That is pathetic, it’s dangerous, it’s un-American.”

The Virginia GOP said both parties have used statements or pledges in the past, including Fairfax County Democrats, who in 2003 required voters to sign a statement affirming belief in the party’s principles and support for the party nominee.

In 2000, the state GOP also required voters to sign a statement confirming their party loyalty. Officials said that pledge was “significantly more detailed” than the current version, and added that the 2000 primary attracted record participation, with more than 660,000 voters casting ballots.

Jenna Johnson contributed to this report.