Michael Phelps has taken the plunge and gotten engaged.

The 18-time Olympic gold medalist announced on Twitter he’s marrying Nicole Johnson, who was Miss California in 2010 and has dated the swimmer on and off for the past few years.

Phelps tweeted early Sunday: “She said yes.” He also posted a photo of the couple, hugging in the snow, taken by teammate Allison Schmitt.

Phelps’ sister, Hilary, wrote on Facebook: “CONGRATULATIONS to these two lovebirds on their engagement! Couldn’t be happier for my brother and thrilled to gain a sister, who I adore and love already!”

The engagement comes as Phelps is finishing a six-month suspension from USA Swimming for his second drunken-driving arrest. The suspension ends March 6, and he is expected to return to competition at Mesa, Arizona, in April.

After his Sept. 30 arrest, the 29-year-old Phelps underwent 45 days of inpatient treatment in Arizona. He continued his therapy in Maryland and enrolled in Alcoholics Anonymous, according to his attorney.

Phelps pleaded guilty to the DUI charge in December and was placed on probation by a judge who warned: “If you haven’t gotten the message by now, or forget the message, the only option is jail.”

Phelps retired from competition after the 2012 London Olympics, saying he had no desire to keep swimming into his 30s and had accomplished all his goals.

But Phelps resumed training in 2013 and began competing again last April in Mesa. He won three golds and two silvers at the Pan Pacific championships in Australia.