Pearl Losoya and David Velasco appeared on each other’s radars as far back as middle school in Union City, Calif., a small city east of San Francisco. Their families were friendly, but in high school they ran in different crowds. She described herself as “bookish” and focused on her studies. Mr. Velasco said he affiliated with “the bad boys.”

After graduating high school in 1999 they lost touch. Ms. Losoya moved to New York where, while working an as broker for State Farm Insurance, she received an economics degree from Stony Brook University.

Mr. Velasco’s life took a different turn. “I joined a gang with everything you can think of that comes with gang activity,” he said.

But in 2012, their divergent paths crossed. Ms. Losoya was back in Union City to host a baby shower for her brother. Mr. Velasco was a guest. Stunned by Ms. Losoya’s beauty and poise, and impressed by her success, Mr. Velasco texted for a date, an overture Ms. Losoya declined. “I saw no future there and I wasn’t interested in wasting time,” she said.

At the time Ms. Losoya had no shortage of potential suitors. She had previously broken two engagements, though she had come to think of herself as “commitment phobic.”

Mr. Velasco, now 39, pursued a friendship over text, with growing success.

“It felt comfortable to be connected to someone from home who really understood where I’d come from,” she said. Ms. Losoya, also 39, had been raised by her mother, Esther Contreras, and her stepfather, Juan Contreras. Her biological father has been incarcerated since she was a young girl.

As their connection took a romantic turn, Ms. Losoya made it clear to Mr. Velasco that he would have to make changes. “I believe in second chances,” she said. “With love, I knew David would turn his life around.”

Within months, the couple had moved Ms. Losoya back to the West Coast. In 2013 they landed in Tracy, Calif., where they bought a home and are raising their daughters, Valentina, now 7, and Daniella, 4. Since 2015, Mr. Velasco has worked as a heavy machine operator for the California Department of Transportation. Ms. Losoya has maintained and grown her career with State Farm.

“Without Pearl, who knows where I would have ended up,” Mr. Velasco said.

On Dec. 5, the couple married by Rebecca Espinosa, a Universal Life minister, at Cavallo Point Lodge in Sausalito, Calif. With a dramatic view of the Golden Gate Bridge as a backdrop, the couple’s children served as flower girls, while a 10-piece mariachi band serenaded the bride as she walked a petal-covered path. The ceremony, conducted in Spanish, included the Mexican tradition of the lasso in which a long rosary was draped over the couple’s shoulders as a symbol of unity.

The sun peeked out briefly before the fog rolled in, chilling the 50 well-spaced guests. Before the ceremony concluded, Mr. Velasco translated the gist of the service for anyone who needed it.

“I love everybody here and I got her back!” he announced before the music started again.