After marrying his wife Melinda, Bill Gates would spend a long weekend every year at a cozy beach cottage in North Carolina — with his ex-girlfriend Ann Winblad.
The billionaire Microsoft founder made sure the bizarre arrangement was part of the deal when he married Melinda French in 1994, he told Time magazine in a 1997 profile.
“We can play putt-putt while discussing biotechnology,” Gates said of his private getaways with fellow nerd techie and ex Ann Winblad — who is now happily married to actor Kevin Kline’s detective brother, Alex Kline, a source told The Post on Tuesday.
Gates even sought Winblad’s approval before proposing to his wife.
“When I was off on my own thinking about marrying Melinda, I called Ann and asked for her approval,” he said, adding that Winblad gave the other woman the thumb’s up.
Winblad recalled, “I said she’d be a good match for him because she had intellectual stamina.”
Gates — who announced with Melinda on Twitter on Monday that they were divorcing after 27 years of marriage — revealed that he and Winblad started taking an annual trip to his ex’s Outer Banks home when they began dating in 1984 after meeting at a computer conference.
The close pair continued making the yearly jaunt down South together even after breaking up in 1987, when Winblad, who at 70 is five years older than Gates, was reportedly more ready to settle down.
The secluded trips involved everything from riding dune buggies to hang-gliding and quiet strolls on the beach.
“We share our thoughts about the world and ourselves,” Winblad told the mag.
“And we marvel about how, as two young overachievers, we began a great adventure on the fringes of a little-known industry and it landed us at the center of an amazing universe.”
At the time of the interview, Gates still had a photo in his office of him and Winblad on a trip to Germany, the magazine said.
He also had a snap of him, Melinda, and a bunch of pals from a trip to Indonesia in 1995 among the rare personal pictures in his workspace.
Gates and Winblad, a software expert and venture capitalist from Seattle, Wash., started off their romance like any other good computer-geek couple — with virtual dates, the outlet said.
They would each be in different cities but go to see the same movie at the same time and then talk about it over the phone.
“Bill wasn’t such a big deal when I started dating him,” Winblad recalled to the San Francisco Chronicle in 2005.
“And there was a period of time when my net worth was higher than his, and I had to pay for everything. It was a very short period of time, but it was memorable,” she quipped.
Meanwhile, Gates seemed eager to please Winblad — agreeing to stop eating meat at the time, although he has since fallen back on that stance, Time said.
And she was in awe of his drive and confidence.
After they started dating, “Bill and I went for a walk on a beach, and Bill tells me, ‘I can see my way, if I really squint, to $500 million in revenue,” Winblad told the Silicon Valley Business Journal in 2013.
That amount was at least five times more than what any software company was doing at the time, the outlet noted.
“Bill was a great influence on me, and I was thinking, ‘Wow, you can actually build a company that big in the software industry? Are you kidding me?’” Winblad said.
“I remember making him take a stick or a rock and drawing the numbers out on the sand for me. How was he going to get there? He then said, ‘What troubles me is I can’t see how I am going to get past $500 million.’
“I thought, ‘You’re troubled about that?’” Winblad recalled. “I was jazzed that someone could think their way through to $500 million. There was a lot of inspiration from each other back then because there was so little collective wisdom.”
She also revealed another time when the pair went to Cabo San Lucas in Mexico for a spur-of-the-moment weekend.
“We got there, and it was hard to get a rental car, so when we finally got one, it was like this beat-up old Volkswagen, and it was Spring Break,” Winblad told Wired in 1996.
“So we get a hotel. It’s a sh—y hotel, but that’s fine because we’re doing this on a whim, and it’s part of the adventure. I leave Bill outside while I check-in.
“Well, I go outside and I say, ‘Where’s the car?’ He goes, ‘I sublet it.’ He rented the car to some teenagers for five dollars a day!” Winblad said.”He gave them the car keys and says, ‘We’re in room whatever. Just knock on the door and give us the keys back.’
“Sort of like ‘I’m Bill Gates; here’s the rental car; here are the keys to our room.’ I’m going, ‘We’re never going to see that car again. These are teenage boys.’
“He says, ‘You’re probably right.’ … We finally got it back at about two in the morning, and it was all in one piece.”
When the then-couple journeyed to Brazil, Gates brought with him a 1,100-page textbook on molecular biology — and the duo studied it together, Time said.
During a trip to a ranch in Santa Barbara, Calif., Winblad toted along with tapes of famed physicist Richard Feynman so they could listen to them.
Gates, interviewed for the same piece, gushed that his former girlfriend “brings a sense of enjoyment and humor to even the most serious situations.
“Her professional approach reminds me a lot of Warren Buffett. She is incredibly smart,” said Gates, a longtime friend of billionaire Berkshire Hathaway founder Buffett.
He talked about his and Winblad’s shared love of travel.
“One of my favorite trips with Ann occurred when we went to Santa Barbara for a week and got tons of movies from a university library to learn more about biotechnology,” Gates said.
“We watched movies for hours even when it was sunny outside.”
In Greece, the couple rented a motorcycle, although Gates was so bad at driving it that Winblad ended up in a ditch, he said.
“Another time we got a dune buggy because I wanted one like the one in [the flick] ‘The Thomas Crown Affair,’ ” Gates said.
“And just a month ago, Ann and I were in North Carolina trying to set a new world record for the number of putt-putt golfing rounds played in two hours,” he said jokingly, apparently referring to one of the pair’s annual trips to her beach cottage.
Winblad told Time that the pair also enjoyed beach gatherings with pals that included what they called “the sing-down” — during which teams would get a word and have to come up with tunes featuring it.
When Gates’ group got the word “sea,” he disappeared for a few minutes, she said — then came strolling up singing a high-pitched version of “Puff the Magic Dragon.”
Winblad married Alex Kline, 63, about six years ago, said a source who knows her gumshoe hubby.
He is a private investigator and Stanford University grad who played an extra in big brother Kevin’s wacky 1988 movie, “A Fish Called Wanda,” the Stanford magazine reported in 2000.
Alex Kline has two adult kids from a previous marriage, the source said.
While Gates is now the fourth richest man in the world as co-founder of the computer software giant Microsoft, Winblad is hardly a slouch.
A former high-school valedictorian and head cheerleader from Minnesota, Gates’ ex co-founded an accounting software company, sold it — and then partnered up with retired NBA Supersonics player and Princeton University grad John Hummer in a venture-capital firm.
Gates became a limited partner in the business in 1999, according to the Guardian at the time.
Additional reporting by Jane Ridley