Forget the Russian government — foreign nationals are increasingly gaining the ability to influence American elections more directly. They’re being granted the right to vote.

From Boston, where the city council is debating the move, to San Francisco, where noncitizens gained the right earlier this month in school-board elections, jurisdictions are looking to expand the boundaries of the electorate beyond its citizens.

Several Republicans fired back this week.

Rep. Jeff Duncan of South Carolina announced a bill that would strip federal funding from states or localities that allow noncitizens to vote in their elections.

“Allowing noncitizens to water down the voice of American citizens at the voting booth disrespects their sacrifice and the value of American citizenship,” Mr. Duncan said in announcing the legislation. “Now more than ever, it is critical that we ensure only American citizens are casting ballots in this country.”

And former Rep. Doug Ose, California Republican, told the Los Angeles Times he’s submitted a ballot proposal to officially stop San Francisco and other California jurisdictions from allowing noncitizen voting.

If he gets enough signatures, voters would decide in 2020 whether to adopt the prohibition.

“It’s very simple. I don’t think noncitizens should be voting,” the congressman told the newspaper.

Many Americans are likely surprised at the notion that noncitizens are allowed to vote, seeing the right to vote as one of the major benefits of citizenship.

And indeed at the federal level, noncitizen voting is illegal, under a 1996 law making it a felony for them to cast ballots in presidential or congressional elections.

But that’s not true at the local level.

Famously liberal Takoma Park, a small jurisdiction in Maryland that abuts the District of Columbia, has long allowed noncitizens, including illegal immigrants, to vote in local elections. About 10 other Maryland jurisdictions have followed suit. And Chicago also allows noncitizen voting in its school elections.

Going back to the nation’s founding, as many as 40 states or territories have allowed noncitizen voting, according to Ron Hayduk, a political scientist at San Francisco State University.

During the country’s early years, being a male property holder was a more important question than citizenship status, Mr. Hayduk said.

The reasons the practice faded vary, Mr. Hayduk said. In New England, fears of French radicals escaping the French Revolution prompted a crackdown. The War of 1812 saw another rollback, as did the surge of immigration from southern and eastern European countries around the dawn of the 20th century.

“It really does boil down to these questions around who’s considered a member, a legitimate member of the polity,” he said.

Mr. Hayduk and Stanley Renshon, a political science professor at the City University of New York Graduate Center, said the push for noncitizen voting comes and goes — though Mr. Renshon said the places that are experimenting with it do tend to be liberal bastions.

“They’re all places which are left-leaning, which have an agenda about citizenship they want to start out with,” he said, with the goal of blurring distinctions between citizens, legal residents and illegal immigrants.

Mr. Renshon said there may be a case to be made for a legal permanent resident parent whose children attend a school to vote in a school board election, but it’s tougher to argue someone who jumped the border or overstayed a visa should have the same right.

Those are the sorts of questions that localities are grappling with.

San Francisco, which approved noncitizen voting in 2016 but had it take effect only last week, allows illegal immigrants as well as other noncitizens to vote in school board elections — though they must be parents or guardians of a school-aged child.

But in Portland, Maine, where the mayor this month renewed his push for noncitizen voting, the proposal would only apply to those in the U.S. with some legal status, such as green-card holders or refugees. Illegal immigrants would be excluded.

Mayor Ethan Strimling first raised the proposal at the beginning of the Trump administration, and says the president’s actions have fueled him.

“The outcry of support for the immigrant community in this city has been remarkable under the Trump administration,” he told the Press Herald newspaper. “It’s so heartening, and I think this is another good step forward.”

J. Christian Adams, a former Justice Department official who now runs the Public Interest Legal Foundation, called noncitizen voting “the next wave of crazy the Left is bringing to undermine our elections.”

“The reason this is becoming an issue is because some political factions like how foreigners vote, both by party and ideologically,” he said, warning conservatives to take the push seriously.

Opponents of noncitizen voting will get several chances to make themselves heard. Mr. Ose’s effort in California will require a massive signature drive.

Advocates are also circulating a proposal in North Dakota to change the state Constitution to explicitly ban noncitizen voting.

In Congress, Mr. Duncan’s bill is unlikely to move amid a busy schedule and a short time until the elections and end-of-year business.

He’s also likely to run into a roadblock from Rep. Jamie Raskin, a Maryland Democrat who pioneered the renewed push for noncitizen voting in the 1990s.

“The virtue of extending the vote in local elections to noncitizens is that it invites noncitizens to participate in, and learn about, American political culture and practices without immediately requiring the greater psychic break of surrendering one’s given nationality,” Mr. Raskin wrote in a 1993 law review article, about the time he was helping push Takoma Park’s voting experiment.

Mr. Raskin’s office didn’t have a comment on Mr. Duncan’s bill.

Mr. Renshon, who has studied Takoma Park’s policy, said the number of noncitizens who actually do vote in their elections is “incredibly small.”

“So you put this opportunity in front of people and they don’t take advantage of doing it. Can you weigh that against the costs of doing it?” he said.