I first heard about this story here. Though this site certainly isn't academic, the story appears to be true (based on a bit of other research I've done).
Coffee has had a tempestuous relationship with Europe since its introduction in the 1500 and 1600s. It was a totally new type of crop from America and the views on it where: 1.) It's a huge source of wealth and delight, producing an interesting new beverage, or 2.) It's an unknown and probably dangerous import that will shatter tavern culture, and also it makes people jittery and nervous and we're all going to die.
King Gustav III of Sweden held the latter opinion. "Coffee was illegal in Sweden as of 1674, yet use continued because it became fashionable among the wealthy and powerful. However, the king was terrified of it and implemented heavy fines against its use.
"Gustav III thought the substance threatened public health and ran a study with two twins to learn more about it. Two identical twins had been arrested and sentenced to death. Instead, the king changed their sentence on the condition that one twin was to drink three pots of tea each day and the other was to consume three pots of coffee. The results? Strangely, the king and all of his physicians died before either of the twins.
"The tea-drinker lived to the age of 83 and the coffee drinker made it even longer. This helped the Swedish government conclude that it couldn’t be that bad for you and in 1794 the ban on coffee was lifted."