(GusLeguizamon1/twitter)

The maths professor who students were shocked to find out used to be a gay porn star is getting married – to an actor he met on set.

Ruggero Freddi, whose stage name was Carlo Masi, is set to marry fiancé Gustavo Leguizamon on May 4.

Speaking to PinkNews, Ruggero – who teaches at La Sapienza University in Rome – said that when he and his partner first saw each other, they clashed.

“Gustavo and I met during the shooting of his first movie in Sacramento,” he explained, before describing a meet-cute which would be right at home in a ’90s rom-com.

“Being the biggest star of the company, I introduced myself expecting that a newcomer would know who I was – but he pretended he didn’t know.”

“So I got upset, angry and fell in love,” he added, laughing.

“We hung out together, so I spoke to the producer and asked if I could shoot a scene with him.”

But as it turns out, the pair didn’t need a script to light their fire.

“One month later, the night before we shot the scene together, we slept together and fell in love,” he said.

But with on-set romances often ending as quickly as they started, it was an uphill struggle to convince those around them that their relationship was real.

“Of course, nobody took us seriously,” he explained. “A love story born on a porn set lasts as long as a rose does: three days.

“But 12 years later here we are, getting married in a few days.”

The professor told PinkNews that he would be “getting married in the most beautiful wedding location in Rome – Villa Miani.”

He said the pair would tie the knot in “very formal black tuxedos,” adding that “Gustavo will arrive in a fantastic Rolls-Royce.”

Same-sex couples can get a civil union in Italy, but it is still illegal for them to marry.

Speaking last year, Ruggero said he was not ashamed of his history.

He entered the industry after spending time looking for engineering work in Italy without success, explaining: “I was offered to do a film in the USA.

“I thought: ‘Why not?’”

Freddi said he saw it as “a job that helps me earn more and is a more entertaining career.”

He eventually quit porn in 2013, returning to Italy, where he earned a Master’s degree in Maths.

In January, Freddi explained what it was like to be open about his former profession.

He said: “I never experienced any discrimination against me, neither when I came out as a gay man nor when people found out what I did before I became a maths professor.

“I sometimes tell [my mother]: ‘Mum, I didn’t find a cure for cancer; I made porn movies. She doesn’t mind, neither do my friends, ever.”

He added: “The only one who was a bit perplexed was my dad. He said: ‘Why invest in university to end up doing porn? You could’ve done porn immediately.’ But in the end, he also was cool with it.”