Wedding of Tom Masog, left, and Dan Strachan at Celebrations by the Bay in Pasadena, Md., on July 14, 2013. (Evy Mages/For The Washington Post)

On their first date, Dan Strachan and Tom Masog found themselves involved in an undercover caper.

It was August 28, 1987, Tom’s last day at his job. He’d packed up his desk and handed in his badge before heading up the street to meet Dan for dinner at Annie’s Paramount Steakhouse in Dupont Circle. The two had been introduced that summer at a meeting of Dignity, a social group for gay Catholics. It wasn’t love at first sight — Dan couldn’t quite figure out this 30-year-old engineer who also sang opera, and Tom took 24-year-old Dan’s initial shyness for snobbery. But over the next few weeks, they’d hung out among mutual friends and decided to pursue the connection they felt forming between them.

Things were going well as they shared their first one-on-one meal — until Tom realized he had left a favorite pair of shoes behind at his now-former office. It was well after business hours, and Tom had no way of getting back into the place. But they decided that if they walked in as though they knew what they were doing, no one would stop them. They played it cool, avoiding the cleaning crew and absconding with the forgotten dress shoes. It was a low-stakes ruse, of course — “I knew the place! I wasn’t going to steal state secrets or anything,” Tom remembers with a laugh — but the thrill of the moment was a perfect capstone for the date. And their goodnight kiss was the dash of romance that suggested it might not be their last adventure.

Both planned to take things slowly. The specter of AIDS that loomed over the late ’80s made both men cautious. But Dan was also still partly in the closet. The successful date with Tom had come at a crossroads moment: He was flying to Florida the next day to come out to family and friends. They “were much more supportive than I had ever expected them to be,” Dan remembers. When he revealed that he had just started seeing someone, his Irish-Catholic mother was mostly relieved to learn that they had met at church. By the time he returned home and found Tom waiting to pick him up at Dulles, he felt as though a new chapter was beginning.

“It wasn’t that we were immediately madly in love. It was that we were slowly growing closer and closer,” Dan says. Before long, they were inseparable. They started going to football games, trading stories of college fraternities, watching Fourth of July fireworks from the rooftop of Dan’s P Street apartment and spending weekends at Tom’s home in Laurel. They were a natural complement to one another, with Dan chatty and full of big ideas, and Tom quieter, logical and even-keeled. “He’s so passionate about a lot of things. I kind of need that to offset my sane, sensible side,” Tom says.

Tom Masog, left, and Dan Strachan pose in a gazebo after the ceremony. They have been a couple for the past 25 years. (Evy Mages/For The Washington Post)

After a year, they moved in together, and one year turned into many. A day at a dog show inspired them to get a chow chow together. “Our dogs are a very big part of our lives. They’ve helped us grow together because we worry about them the way other people worry about kids,” Dan says. They soon dived into the dog show world themselves, adding more chows to their family and traveling around the country to show off their prized pets. In that quirky community, they found a new set of friends who knew them as a couple; in fact, many simply call them “Tomanddan” — one word, one unit. Years later, their first two beloved dogs died within two weeks of each other. Tom and Dan were grief-stricken, and they found they could rely on each other for love and support during a time of profound sadness. “We needed each other at that time. We are each other’s best friends,” Dan says.

Years turned into decades, and they eventually bought a house together near Annapolis. They felt like a family, but with same-sex marriage not yet legal in Maryland, there was nothing officially tying them together. “We could walk away at any moment. And we never did,” Dan says. “I think that goes back to how we were raised. Both our parents had their first and last marriages. Strong families with strong commitment.” In 2004, they worked through legal avenues to ensure that they were recognized as each other’s next of kin.

Other gay friends had commitment ceremonies or traveled to other states to marry. But Tom and Dan weren’t interested unless they could wed in their adopted home state. “We barely even talked about it before the vote. . . . We didn’t want to get the hopes up too far,” Tom says. In March 2012, when he heard that Gov. Martin O’Malley had signed same-sex marriage into Maryland law, Dan texted his partner of 25 years.

“I texted, Well, if this thing passes [the November referendum], why don’t we get married?” Dan remembers. Tom simply replied, “Y.”

“There was no ‘Will you marry me?’ or anything like that. It was just unconventional, like a lot of things we’ve done,” Dan says.

In mid-June, they held a simple civil ceremony in the chambers of Judge Michele Hotten, with about 20 friends and coworkers present. And on July 14, about 70 guests gathered at Celebrations on the Bay in Pasadena, Md., to witness their wedding. Tom, now 57, and Dan, 50, had arranged a weekend of Annapolis-themed entertainment, including a cruise on the bay and a pub crawl downtown, and opted to use only Maryland-based vendors for the event. “Because I believe they voted for us to have it, we owe it to the state to help the economy by spending our wedding money in Maryland,” Dan says.

The grooms donned tan pants and Tommy Bahama shirts as they stood before a sweeping view of the Chesapeake Bay to exchange vows. Under the baking sun of a soupy, humid morning, Dan noted that it had been 9,452 days since their first date. After all that time, he said, “What else can I say? Thanks for the memories? Here’s to the next 26 years? I say I love you more than I could ever imagine. . . . I choose all of the above.”