A run-in with a vicious Bronx gang left a teenage boy clinging to life yesterday with stab wounds to the stomach and chest, his family and officials said.

“It’s a miracle he’s alive,” said the boy’s distraught mother, Leonarda Pepin. “They barely missed his heart. He could have died.”

Allan Paulino, 14, was riding his bike near East 188th Street and Belmont Avenue at about 11 p.m. Tuesday when he passed a group of Hispanic men, who witnesses said were part of a Mexican gang called Locos.

Someone in the group hit Paulino in the back with a bottle. The teen “stops and asks, ‘Who threw that?’ and the Mexican guy said, ‘Me!’ and took out a knife, stabbed him twice in the side and the chest,” said friend Miguel Bonilla, 17, who was with Paulino.