Washington (CNN) More than a dozen secretaries of state slammed a rider attached to legislation to reauthorize the Department of Homeland Security that would allow Secret Service to be dispatched to polling places nationwide during a federal election.

"This is an alarming proposal which raises the possibility that armed federal agents will be patrolling neighborhood precincts and vote centers," according to the letter , which was obtained by CNN.

In the letter, which was sent Friday to Senate leaders Mitch McConnell, a Kentucky Republican, and Chuck Schumer, a New York Democrat, the 19 secretaries of state write that they believe the proposal is "unprecedented and shocking."

"Secretaries of State across the country agree that there is no discernable need for federal Secret Service agents to intrude, at the discretion of the president, who may also be a candidate in that election, into the thousands of citadels where democracy is enshrined," they wrote.

The legislation has already passed the House of Representatives with bipartisan support, but it was not included in the Senate bill passed out of the Senate Homeland Security and Governmental Affairs Committee last week.

Read More