Patrick Dempsey & Wife Jillian Return to the Spot They Got Married to Celebrate Their Anniversary

Patrick Dempsey celebrated his 19th wedding anniversary Tuesday, just three years after his marriage nearly ended in divorce.

The former Grey’s Anatomy star, 52, took his wife, Jillian Dempsey, to the gazebo at which they both exchanged their vows in 1999. In a sweet photograph, in which the two shared a kiss, the actor wrote, “This spot 19 years ago, today!”

Jillian also shared a photograph on their anniversary, giving fans a look at a flower arrangement with the caption, “Gorgeous arrangement! Happy 19th Anniversary @patrickdempsey 💕💕💕.”

While they looked like the picture-perfect couple on Tuesday, just a few years ago their union was in trouble. In 2015, the makeup artist filed for divorce from the actor after 15 years of marriage.

However, just a year later, the actor told PEOPLE in 2016 the two were working hard to repair their union.

“Our marriage was not something I was prepared to let go of,” Dempsey said. “I didn’t feel like we had done all the work. And we both wanted to do that work. That’s where it started.”

This spot 19 years ago , today !

A post shared by Patrick Dempsey (@patrickdempsey) on Jul 31, 2018 at 8:00pm PDT

“It’s always destabilizing when you’re potentially breaking up a family or you have a big section of your life that’s ending,” he said.

Despite their differences, the two attended marriage counseling and put in the effort to pick up the pieces.

“Jill and I decided it was time to work on our issues and improve,” he added. “We wanted to be role models for our kids like, okay, if you have differences, you can work them out.”

The couple first met in 1994 but were in relationships with other people so they did not begin dating until 1997.

RELATED: Patrick Dempsey on Saving His Marriage with Jillian: ‘I Wasn’t Prepared to Give up on Her’

Well here’s an oldie.....@patrickdempsey #happyfathersday ????

A post shared by Jillian Dempsey (@jilliandempsey) on Jun 17, 2018 at 1:12pm PDT

The pair tied the knot in 1999 at a farmhouse in Maine that belonged to the actor’s family. Jillian’s sister, Kristen Mason, told PEOPLE at the time that the Bridget Jones’s Baby star “saw her and started crying” when his wife-to-be began walking down the aisle.

Jillian, who has worked as a makeup artist and hairdresser for stars like Kristen Stewart and Jennifer Lawrence, gave birth to their first child, daughter Talula Fyfe, in 2002, and their twin sons, Sullivan Patrick and Darby Galen followed in 2007.

These days, the couple seems more in love than ever. The mother of three honored her husband with a sweet Father’s day post in May with a throwback photo of him and their three children that was taken when their sons were still newborns.

“Well here’s an oldie…..@patrickdempsey#happyfathersday 🖤,” she wrote in the caption.