Vincent Perazzola saw the man enter his store. It wasn’t going to happen again.

Twice in the last few months, a man casually entered Perazzola’s Pacific True Value hardware business in San Pedro and walked away with his inventory of heavy bicycle locks. In those crimes, the man made off with 15 to 20 locks, each worth $20 to $30.

Perazzola recognized him about 11 a.m. Sunday.

“I was close to the doors,” Perazzola said. “He had three or four of them in his hands. He is starting to run out to the door. I said, ‘Oh no. Not again.’ ”

Perazzola, 64, chased the shoplifter outside and pushed him down as he tried to get on his bike to ride away.

“I started fighting him with his own bike,” Perazzola said. “He was coming at me with those locks. He caught me in the back of his head.”

Blood streaming from his scalp, Perazzola kept hold of the bike and refused to give it to the man, who kept at least a couple locks and took off.

Perazzola called police and went to a hospital, where a doctor used four staples to close his bloody head wound.

The story could end there, with a suspect on the loose and a community angry about an unsolved crime in downtown San Pedro. But in less than 24 hours, a solid witness, 2016 technology and a social media frenzy resulted in the man’s arrest. The potential charges could send him to jail for years.

Little did Perazzola know about Porscha Abrons, a San Pedro woman riding in a car along Pacific with her boyfriend, Daniel Smith, and their daughter, at the right moment.

Abrons saw the men run out of the store with their hands raised as if they were about to fight. Abrons told her boyfriend as they passed by that she suspected the man had just robbed the store. Looking in the rear-view mirror at Ninth Street, Abrons saw Perazzola pick up the bike and lunge at the other man.

“There is a big scuffle going on,” she said.

Smith turned the car around and headed back. At that point, the robber took off across the street, but stopped, turned around and ran back to Perazzola. He tried to grab the bike, but Perazzola wouldn’t let him take it.

Smith took a clear photo of the man as he ran away through an alley.

“He said, ‘I’m going to listen out for the news in case it gets reported on the news and then I can turn this photo in,” Abrons said.

Before that could happen, Francesca Perazzola posted an update about the crime, complete with bloody photos of her father, on the Facebook page, “Saving San Pedro,” a site devoted to reducing crime and homeless issues in the community.

“ENOUGH!!!” Francesca wrote. “There’s some San Pedrans who don’t get it. These homeless drug addicts have no concern for any one of us. NO ONE!!”

Facebook users shared it again and again. Abrons saw it Sunday and quickly got in touch with Francesca over the web. She sent her boyfriend’s photo and Francesca added it to the post.

Before long, police officers recognized the photo and, by Sunday afternoon, were out looking for him. Perazzola said detectives arrived Monday in his shop to show him photographs that included a suspect. Perazzola picked out the man.

Jared Christopher Vigil, a 26-year-old transient, soon learned the heat was on, Los Angeles police Capt. Michael Oreb said. Vigil apparently realized his photo was circulating throughout the community and the police were trying to find him.

He walked into the Harbor Division station Monday morning and surrendered.

“Good. The power of social media,” Abrons said. “We just happened to be in the right place at the right time.”

Vigil could be charged as soon as Tuesday. What started as shoplifting turned into what could potentially be charged as robbery and assault with a deadly weapon.

“I just cant believe how fast it happened,” Perazzola said. “I’m grateful. I’m grateful for that lady.”

Francesca Perazzola said she was grateful her father wasn’t hurt more severely, and even more thankful for the community response.

“I’m very happy that our town was able to come together to bring justice to my family,” she said. “It just goes to show that social media can be used for good if we choose to use it correctly. Thank you to the town of San Pedro!”