SAN JUAN, Puerto Rico — Liz G. Rodríguez Quiñonez grew up schooled in being able to throw her body to the floor in the middle of the night, in the event that stray bullets from a nearby shootout came crashing through her window.

But it was only this past fall when Ms. Rodríguez, who operates a food truck in a town just east of the Puerto Rican capital, experienced her first murder: Standing by the stove in her truck one morning in September, she heard a series of pops, then screaming, and realized that the man who was the intended target of the gunfire was standing right behind her truck. She ducked — thanks to the training from her youth — but there was no hope for the man, who died only a few feet away.

It was not yet noon.

“I saw the dead body. He was around 30 years old. It was horrible,” Ms. Rodríguez, 30, said with a shudder.

Puerto Rico has long had one of the highest murder rates in the country, almost all of it attributable to gang violence. But a recent spree of brazen daylight killings, some of which were captured on video and widely shared on social media, have shaken the population and worried local and federal law enforcement officials who thought they had seen everything in the roiling, populous city of San Juan.