Voters scattered and took cover as shots rang out across from a polling station in Dorchester’s Lower Mills neighborhood yesterday, leaving a man hospitalized with life-threatening injuries.

“People were running for cover — it was a pretty wild scene,” said Chuck Winchester, 52, an election volunteer working for Linda Dorcena Forry. Winchester had just tallied voting numbers at the Lower Mills Library and walked outside about 5 p.m. when he said he heard four shots.

Boston police said a man was shot in a parking lot across the street from the library and was taken to Boston Medical Center with life-threatening injuries.

Another shooting yesterday, shortly before 4 p.m. in Roxbury, left another man with non-life-threatening injuries. That shooting occurred near Humboldt Avenue and Homestead Street, cops said.

In the Dorchester shooting, witnesses said after the volley of gunfire, a man with dreadlocks was lying in a CVS parking lot, but paramedics arrived within minutes.

Clive Drummond, 70, of Dorchester, said he was walking to pick up his 11-year-old son, who was at the library with friends, when the gunfire erupted and kids no older than 13 sprinted past him.

“It’s the kind of madness that you’re not able to make sense of,” Drummond said. “This is a relatively safe neighborhood.”

Cops on scene blocked off Richmond Street with crime-scene tape near the front of the library.

Voters were directed away from the crime scene and down Dorchester Avenue and toward a back entrance of the library to vote.

“We were able to keep the voting going,” said police Superintendent Bernard O’Rourke. “People are going in and out.”

O’Rourke said the man was in critical condition with injuries to his “upper body.”

“This area is obviously a very, very safe area. This is clearly out of the ordinary,” O’Rourke said.

He pleaded for the public to come forward while detectives reviewed surveillance video and talked to witnesses.

“We take these things very, very seriously,” O’Rourke said. “Right now, we just don’t have too much to go on.”