PARK CITY, United States - Have you heard the one about the doctor in Kansas who made a fortune peddling goat testicles to cure impotence?

This may sound like the opening line for a joke, but it's actually the strange true tale of John Romulus Brinkley, a small-town doctor in 1900s America, whose rags-to-riches story is the subject of a funny and captivating documentary at the Sundance Film Festival.

Directed by Penny Lane, "Nuts!" traces Brinkley's unbelievable rise to fame as he comes up with a surgical method to transplant goat testicles into impotent men while living in the tiny Kansas town of Milford in 1917.

"I started working on this documentary after coming across a book in the library about Brinkley called 'Charlatan'," Lane told AFP. "And the whole time I was reading it, I was thinking, 'did it (his medicine) work?'"

Legend has it that the transplant idea dawned on Brinkley when he was visited by a farmer named Bill Stittsworth who, gazing out the window at two copulating goats, asked the good doctor if he could do something about his "sexual weakness."

"It's too bad I don't have billy goat nuts," Stittsworth tells Brinkley -- as recounted in the film -- before convincing him to "just put some goat nuts in me."

As some of Brinkley's "satisfied" customers begin showing off their offspring and the procedure gains popularity, he enjoys a meteoric rise to fame, amassing a fortune and a roster of celebrity clients.

'Seduced, and maybe fooled'

That's until his dubious practices gain the attention of the medical establishment and the federal government, which goes after him and strips him of his license.

Brinkley responds by getting into advertising, launching a wildly popular radio station and continuing to peddle miracle cures to his followers.

He also uses his enormous wealth to dabble in politics and almost wins the governor's race in Kansas.

The documentary, which has received favorable reviews at Sundance, skillfully mixes animated reenactments, interviews and archival footage to bring Brinkley's story to the screen.

Lane said she was keen on the project because the subject was entertaining, and because it showed how easily people can be seduced, "and maybe fooled," by quacks like Brinkley.

"I wanted to make clear that we are all gullible and dumb enough to fall into it," she said. "But if someone is telling you a story and it seems too good to be true, that's when you should start questioning it."

She added that while some today may laugh at those who fell for the goat testicle impotence cure, there were plenty of modern-day Brinkleys walking around.

"Some people, I think, would compare Donald Trump to Brinkley," Lane said, referring to the leading Republican candidate in the U.S. presidential race.

"Brinkley's campaign for governor annoyed the hell out of the establishment, and we find out that he wasn't really even interested in politics," she added.

"I don't know if that's true about Trump but I suspect it is."