By VINCENT M. MALLOZZI

The rain fell hard on Kevin McHale as he slogged through the empty cobblestone streets of his Washington neighborhood on a cold October night in 2011.

Mr. McHale, then a mathematician at the United States Department of Defense, still had no answer to what happened to him two weeks earlier when Joanna Wollersheim, a colleague with whom he had been happily dating for more than a year, suddenly called it quits.

“I was completely blindsided and walking around in a daze,” said Mr. McHale, who is now 35 and writes software programs used for statistical analysis at the Washington office of the Premise Data Corporation, a San Francisco-based technology company.

“We were driving to a friend’s birthday party when Joanna just turned to me and said she wanted to break up,” he said. “There was a lot of confusion, and a lot of tears.”

Ms. Wollersheim, 34, a researcher at the Defense Department, blamed the breakup on “dealing with personal challenges and immaturities.”

“I was young and feeling smothered,” she said. “The idea of being in a relationship while I was still trying to find my inner self became overwhelming.”

They had met in June 2010 amid more sweat than tears at an exercise boot camp held two nights a week in what Ms. Wollersheim described as “the dimly lit basement of a U.S. Defense Department building.”

“There were all of these muscular drill-sergeant-types in our faces, just barking out exercise orders,” she said. “It was grueling, but it was a nice change of pace from sitting behind a computer all day.”

It wasn’t long before Mr. McHale noticed Ms. Wollersheim.

“She was the fastest and most fit person there,” he said. “She had this real exotic look about her, with olive skin and short hair and she always dressed in a neat, funky way. She was absolutely beautiful.”

Though Mr. McHale did not introduce himself during their intense workouts (“I didn’t want to risk even more punishment from our instructors for talking during class,” he said, laughing), he managed to catch up with Ms. Wollersheim two weeks later at a going-away party for a mutual friend held at a bar in Washington.

They began talking and found out that they lived a half-mile from each other on the north end of Capitol Hill. Ms. Wollersheim, who was unattached at the time, was instantly taken with him.

“He was so attractive, I couldn’t believe I hadn’t noticed him in boot camp,” she said. “I was so impressed with the fact that he had this real sense of genius about him but wasn’t at all pretentious and had no ulterior motives, unlike most people in Washington who go out of their way to show you how well rounded they are and size you up for whatever connections they can make through you.”

She suggested they car-pool from their evening workouts to their respective apartments. The next day, they were on the road to discovering each another, a half-mile at a time.

She learned that he had grown up in Woodhaven, Queens, and was 13 when his father, Michael McHale, a retired captain in the New York City Transit Police Department, moved the family to Boca Raton, Fla.

The younger Mr. McHale graduated from the University of Florida, then traveled west to the California Institute of Technology in Pasadena, where he received a Ph.D. in bioengineering.

While in graduate school, he designed and built a laser-scanning microscope used to study the motions of individual molecules of DNA. Developed solely as a research instrument, it is still used for that purpose at Stanford, where Mr. McHale later did some postdoctoral work.

“I was blown away by his intelligence,” Ms. Wollersheim said. “He could talk about anything, but he never came across like he was bragging. He was always humble and very unassuming.”

Mr. McHale learned that Ms. Wollersheim had grown up in the small town of Appleton, Wis., and graduated from the University of Wisconsin, Madison, before embarking on a journey that didn’t quite seem to match the DNA of a small-town conservative girl.

In 2004, she traveled to Egypt, where she received a master’s certificate in Arabic and Middle Eastern Studies from the American University in Cairo as an international Fulbright scholar. She spent three years in Cairo, during which she taught English to Egyptian children and rowed on the university’s crew team. She left Egypt for Syria in 2007, where she spent the next year studying the Arabic language at Damascus University.

“I was fascinated by her experiences,” Mr. McHale said.

Along the way, they found they each had a common love of working out, taking long bike rides, reading Hemingway and trying new restaurants.

“I was beginning to feel a great sense of comfortability around him,” Ms. Wollersheim said.

But that feeling evaporated, she said, the moment Mr. McHale mentioned in passing, about two weeks in to their conversations, that he had a girlfriend. (Though he maintains he had mentioned it “a lot sooner than that.”)

“I was heartbroken,” Ms. Wollersheim said. “I remember getting so upset and going home and just sitting on the couch and feeling terrible about the whole situation. I was very depressed and disappointed. But it was a reality I had to accept.”

Interactive Feature | NYT Living Newsletter Get lifestyle news from the Style, Travel and Food sections, from the latest trends to news you can use.

By August, boot camp had ended, and with it their car-pooling arrangement. Ms. Wollersheim said that she and Mr. McHale “kind of remained friends and talked on occasion.”

In February 2011, the Defense Department began relocating certain offices. Mr. McHale was sent to another building and the following month, Ms. Wollersheim’s office was relocated to the same building. They were soon bumping into each other and conversing with greater frequency. Before long, they were car-pooling again.

“I still had a crush on him,” Ms. Wollersheim said. “But at that point, I had learned to guard my heart from wanting something that wasn’t available to me.”

In April 2011, Mr. McHale mentioned in an email to her that he and his girlfriend had split up.

“I was in disbelief,” Ms. Wollersheim said. “I knew this was about his life, so I wasn’t sure that meant anything for me, I really had no idea where things might go from there.”

The following month, she received a text from Mr. McHale inviting her up to his rooftop one early morning to watch the sun rise. “I was really excited,” she said, “but I wasn’t quite sure if I was going on a first date.”

Neither was he.

“I hoped that she would consider it a date, because I really liked her,” Mr. McHale said. “I figured that she couldn’t possibly think this is something that two friends do before they drive to work in the morning.”

Up on the roof, they snuggled under a blanket in the chill of the predawn, and as the sun began to rise over the nation’s capital, they shared their first kiss.

They began dating steadily and seemed to be sailing along until that October day when Ms. Wollersheim abruptly ended their relationship.

“All of a sudden he blurts out ‘I love you,’” Ms. Wollersheim said. “We had never spoken those words before.”

Nevertheless, they parted ways and had not seen nor heard from each other for two weeks until Mr. McHale, confused and hurt, took that lonely walk in the rain. Wandering around that night, he spotted a figure walking toward him in the dark.

“It was Joanna,” he said. “I couldn’t believe it.”

Neither could she.

“I remembered thinking at that moment that it had to be God who dropped us off on yet another path where we were headed for each other,” Ms. Wollersheim said. “I truly felt it was a sign that we still had something very special together.”

They retreated beneath an awning and began a two-hour conversation that left them feeling as though they would make it through the storm, together.

“We discussed what we had been going through emotionally during the breakup,” she said. “I realized that I had been putting up a lot of walls and that I needed to trust that moving forward, Kevin would be a supporting force in my life.”

In the time since, the bride’s father, Jerry Wollersheim, said he saw how his daughter (“a strong-willed girl”) and Mr. McHale (“a problem-solver by nature”) grew in their relationship. “They have come to appreciate each other’s talents and shortcomings,” he said, “and it’s that kind of love and respect that has allowed them to them work through any problems.”

The couple were married April 24 at St. Francis Hall, adjacent to the Franciscan Monastery in the serene Brookland neighborhood of northeast Washington. Stephen Norberg, a friend of the couple and a minister of the International Church of the Foursquare Gospel, officiated before 143 guests.

As the ceremony began in the medieval-looking hall, “Here Comes the Bride” played over the speakers as the guests applauded and fixed their collective gaze at large French doors in the back of the hall from which Ms. Wollersheim would surely emerge. But the guests began stirring after a near minute had ticked by and the bride had not yet appeared.

“Nobody worry, I know exactly what to do,” the groom announced into a microphone as a sneaky grin ran across his face. He hopped off the stage and scooted down the aisle until he reached his friend Matt Fouse.

After a brief exchange, Mr. Fouse pulled a trumpet he had stored in a backpack and hidden under his chair, put it to his lips and looked up toward the cartwheel chandeliers and a window on a second level of the hall, above the French doors.

The bride appeared in the window, wearing a blush- and rose-hued wedding gown by Bhldn from Anthropologie with a cherry-blossom-colored lace ribbon braided into her hair that fell off her shoulder.

“How did you find your way to my bedroom?” the bride asked in a Shakespearean tone, treating the amused guests to a more modern, more colloquial version of a scene from “Romeo and Juliet.”

“It was but love that led me here,” said the groom, who then went off script. “And I don’t think I’ll be able to say much more without laughing or crying,” he said.

As more laughter filled the theatrical space, the bride shouted, “I’ll be right down.”

Before reciting their vows, the couple took turns sitting on the stage to talk about relationships, in particular their own, and what they had learned about love since entering each other’s lives.

“What our relationship taught me is that love requires an enduring heart,” Ms. Wollersheim said. “Love is not a Hollywood movie where prince and princess meet, it’s a lifetime journey filled with many challenges.

“By walking together,” she said, “we have the strength it takes to make that journey through any kind of weather.”