In the annals of the frustrating fight against impotence, men have ingested rhino horn dust, performed elaborate dances, employed vacuum hydraulics and chanted what one historian called “protective spells” that went like this: “Get excited! Get excited! Get an erection!”

But none of those remedies was as successful — or crazy — as what one physician did at a urological conference in 1983. Before presenting his research to hundreds of doctors, Giles Brindley injected — yes, injected — his penis with a chemical that made it erect. On stage, he dropped his pants to demonstrate the results.

(Insert your own mental image here.)

“There was not a sound in the room,” a urologist recalled in a scientific journal. “Everyone had stopped breathing.”

It is quite possible that audience members, having “dispersed in a state of flabbergasted disarray,” did not exhale for another 15 years, when federal regulators approved Viagra — the little blue pill that made it a little easier, and certainly less humiliating, for men to make everything work as God intended.

Viagra, approved 20 years ago, on March 27, 1998, became a pharmaceutical and cultural phenomenon at a very odd moment — amid President Bill Clinton’s sex scandal with intern Monica Lewinsky, when one of Clinton’s fiercest and oldest political enemies became a TV pitchman for the drug.

Bob Dole, the conservative Republican senator from Kansas.

“Dole may have lost the presidential election,” Meika Loe wrote in “The Rise of Viagra,” “but this time he returned victorious,” capturing the country’s attention — and late-night-TV laugh lines — as “the one bringing respectable sexuality back to America and American politics.”

And you thought things were strange now.

The moment, in retrospect, came about from a virile accident.

Pfizer was developing a chemical compound called sildenafil citrate for high blood pressure. It was not going well.

“It was so close to failure that people weren’t coming to the meetings,” Pfizer chemist David Brown told Bloomberg News in an oral history of the drug. “I mean, you know how people sort of smell failure and disappear? It was that close.”

The scientists kept going, hoping for a breakthrough.

And then, finally, one emerged when they tested the drug on miners. But it had nothing to do with their blood pressure.

“Is there anything else you noticed you want to report?” Brown recalled asking the miners. “One of the men put up his hand and said, ‘Well, I seemed to have more erections during the night than normal,’ and all the others kind of smiled and said, ‘So did we.’ “

The side effect wasn’t really a side effect: It was the jackpot.

Pfizer switched gears, studying the compound as a way to treat impotence. Men were given the drug in lab settings and instructed to watch dirty movies.

“They were fitted with what was called a RigiScan — you can imagine what that does,” Brown told Bloomberg News.

(Insert your own mental image here.)

“At the end of the week,” Brown continued, “we had to get the drugs back from them, anything that was unused. Some of them would not give the drug back.”

The drug wound its way through the approval process. The jokes began almost immediately. “You must have heard them,” Loe wrote. “In nursing homes, Viagra keeps male patients from rolling out of bed. Did you hear about the first death from an overdose of Viagra? A man took 12 pills and his wife died. Viagra is now being compared to Disneyland — a one-hour wait for a two-minute ride.”

And so on.

But Viagra really worked wonders. It became such a hot commodity around the world that — we are not making up the next part of this sentence — the CIA used it in Afghanistan to influence tribal elders in need of a little lift. The Post’s Joby Warrick reported:

Such was the case with the 60-year-old chieftain who received the four pills from a U.S. operative. According to the retired operative who was there, the man was a clan leader in southern Afghanistan who had been wary of Americans — neither supportive nor actively opposed. The man had extensive knowledge of the region and his village controlled key passages through the area. U.S. forces needed his cooperation and worked hard to win it, the retired operative said.

After a long conversation through an interpreter, the retired operator began to probe for ways to win the man’s loyalty. A discussion of the man’s family and many wives provided inspiration. Once it was established that the man was in good health, the pills were offered and accepted.

Four days later, when the Americans returned, the gift had worked its magic, the operative recalled.

“He came up to us beaming,” the official said. “He said, ‘You are a great man.’ “

“And after that we could do whatever we wanted in his area.”

But the little blue pill, now 20 years old, was more than just a punchline, or CIA inducement, or a vehicle for Bob Dole to get his groove back.

The scientists who worked on the drug, along with historians and cultural scholars, say Viagra changed the way America talks about sex — more open, less puritanical.

The bar for sex talk has been lowered so low that this past election cycle a presidential candidate named Donald Trump felt okay referencing the size of his penis and, apparently, the fact that he didn’t need a prescription to make it even larger.

“I guarantee you there’s no problem,” he said during a debate. “I guarantee.”

Read more Retropolis:

Hugh Hefner, the murder of Dorothy Stratten and the dark side of Playboy

Brutally killed by Charles Manson’s followers, Sharon Tate became the face of victims’ rights

The Rothschilds, a pamphlet by ‘Satan’ and anti-Semitic conspiracy theories tied to a battle 200 years ago

JFK’s last birthday: Gifts, champagne and wandering hands on the presidential yacht

“Great God, he is alive!” The first man executed by electric chair died slower than Thomas Edison expected.