The state’s top elections official warned voters Thursday to be alert for unusual text messages claiming they are not registered to vote in next week’s primary election.

Secretary of State William Galvin said “multiple communities,” mostly in Middlesex County, have reported residents receiving texts in the past week suggesting they are ineligible to cast a ballot and offering a link to register.

Galvin said his team is still unsure of the motives behind the texts, but stressed that voters should not click on the links and should instead report such activity to local elections officials.

“These are scams. No local officials, nor anyone else representing election administration in Massachusetts, texts voters to do anything,” Galvin said. “At best, these are mistaken efforts, maybe by campaigns. At worst, they’re more likely efforts to get personal information.”

The secretary did not specify exactly how many communities observed the texts, though he said the incidents stretched across multiple electoral districts.

Galvin said his office has contacted municipal authorities and law enforcement in affected areas, but stressed that the response is still at an early point.

“We just don’t want people to mistakenly provide information, even if it was simply to a campaign,” he said. “A campaign shouldn’t need that. Campaigns can reach voters and get lists from local officials. They shouldn’t have to do that.”