THE baby doc who will deliver Princess KATE’s royal twins was at the center of one of Britain’s most notorious unsolved murders, The ENQUIRER has learned.

Dr. Alan Farthing was engaged to popular U.K. TV host and news anchor Jill Dando – the “British Katie Couric” – when she was shot dead in broad daylight on her doorstep outside her London home 13 years ago.

The execution-style manner of the shooting immediately prompted speculation that Dando might have been the victim of a hit man. Farthing was questioned about the horrific crime and quickly cleared, but despite his iron-clad alibi, the physician couldn’t stop the incredible rumors that he may have had a hand in the murder.

According to a royal source, the murder mystery still haunts Farthing, now 47, who became the queen’s gynecologist in 2008.

“Of course William and Kate know about the terrible tragedy, and they realize how tough it must have been for Alan,” the insider told The ENQUIRER.

“Jill was killed just five months before they were due to marry, and the worst thing is that her murder remains unsolved. It’s been impossible for him to truly find closure. He still has nightmares about what happened. It won’t be lost on Kate that although she’s hoping her doctor will bring her two bundles of joy into the world, he suffered a great private loss.”

On April 26, 1999, Dando, 37, left Farthing’s house in Chiswick, West London, to go shopping. She returned to her home in nearby Fulham, where she was gunned down.

In 2001, loner Barry George was found guilty of the killing and sentenced to life imprisonment, but his conviction was overturned on appeal. He was acquitted of the murder in 2008 after spending seven years behind bars.

Meanwhile, Farthing went on to marry fellow doctor Janet Stowell in a small civil ceremony in 2008, and the couple had a son in 2010.

When he took over the prestigious role as the queen’s gynecologist four years ago, Farthing became one of the youngest doctors to treat the royal family. He met Kate after her wedding to Prince William, and they reportedly hit it off right away.

“Kate and William have the utmost faith in him and they have no doubt whatsoever that he’s the right person for the job,” said the insider.

With Kate expecting twins – as sources told The ENQUIRER last week – the royals have also drafted in Farthing’s predecessor, Dr. Marcus Setchell, 69, as a backup. “To be the one who delivers the royal babies is a great honor for Alan,” added the insider. “It will be another major milestone in rebuilding his life after the tragedy of losing Jill.”