Officials in the US state of Pennsylvania have rejected claims that “illegal voters” were able to apply for ballots and vote at an election office in Allegheny County.

Officials have put out a statement after posts on X went viral, claiming to show “illegal voters” being guided past US voters who had been waiting in line.

The video shows a queue outside a satellite election office in Allegheny County – the state’s second most populous county – and a second smaller group who appear to pass by the lengthy line and speak to someone near the entrance of the election centre.

Allegheny County officials told the BBC that the group had come to apply for mail-in ballots and the officials reiterated that only US citizens can register to vote.

BBC Verify understands that some people in the group seen in the viral video are US citizens of Nepalese and Bhutanese heritage. The BBC has not been able to independently verify this.

Viral posts on X claimed that buses of “non-citizens” had been brought in to cast their vote illegally. Some also claimed that they were wearing stickers supporting the Harris-Walz campaign, which are not visible in the video.

The video has been viewed by millions on X and shared by right-wing influencers, some espousing conspiracy theories.

Tech billionaire Elon Musk, the owner of X, replied to one post with the video: “Is this real?”

It is illegal for non-US citizens to vote in federal elections, and studies show that cases of this happening are extremely rare.

Others online speculated that not only had the group voted illegally, they had also skipped the line to do so. But county officials told BBC Verify that some in the group “needed the assistance of translators”.

Officials say the moments recorded in the viral video were a brief conversation between voters, their translators and a county employee, which was circulated online by right-wing influencers.

“The County employee provided instructions that elderly and disabled people were allowed to sit while they waited for their applications to process,” officials said, adding that this was the case for any elderly or disabled voter at any voting office.

Referring to the viral video, they said, “the able-bodied voters returned to the back of the line, elderly and disabled voters were permitted to sit and wait their turn, and those who needed the assistance of a translator were able to use their translator to help them through the process”.

A separate video that has been shared alongside this one shows a man who claims to have been at the voting site at the time and saw the incident unfold. We have not been able to verify this video.

Pennsylvania’s Secretary of State, Al Schmidt, said “spreading videos and other information that lack context and sharing social posts with half-truths and even outright lies is harmful to our representative democracy”.

Pennsylvania is a key swing state and has been the focus of claims by right-wing influencers questioning the integrity of the vote.