An attempt by the Miami-Dade elections department to let more people vote early Sunday devolved into chaos after the department was overwhelmed with voters.

The department locked its doors about an hour into the four-hour operation without explanation, then said it would resume allowing voters to request and cast absentee ballots in person. Miami-Dade had opened its Doral headquarters from 1 p.m. to 5 p.m. as a work-around to a provision in state law that eliminated early voting the Sunday before Election Day.

Anyone in line by 5 p.m. at the Doral elections headquarters at 2700 NW 87th Ave. will be allowed to vote, department spokeswoman Christina White said at 3 p.m. The department brought in a second ballot printer and more staffers to re-open.

Shortly before the temporary shutdown an hour earlier, the department had said it would not be able to accommodate more than the around 180 voters who were in line by 2 p.m. Then the office shut its doors, and people in line started shouting, “Let us vote!”

Some voters who had parked in a lot across the street saw their cars getting towed.

“This is America, not a third-world country,” said Myrna Peralta, who waited in line with her 4-year-old grandson for nearly two hours before being turned away. “They should have been prepared.”

When it opened its doors, the department had only one ballot-printing machine, five voting booths and two staffers to assist voters. The office said it was overwhelmed by voters.

“We had the best of intentions to provide this service today,” White had said. “We just can’t accommodate it to the degree that we would like to.”

Miami-Dade had announced Sunday morning that it would allow voters to request, fill out and turn in absentee ballots on the spot for four hours in the afternoon after the Florida Democratic Party filed a lawsuit in the wee hours seeking to somehow extend voting in Miami-Dade, Broward and Palm Beach counties before Election Day.