Soldiers with deep wounds sometimes feel no pain at all for hours, while people without any detectable injury live in chronic physical anguish. How to explain that?

Over drinks in a Boston-area bar, Ronald Melzack, a psychologist, and Dr. Patrick Wall, a physiologist, sketched out a diagram on a cocktail napkin that might help explain this and other puzzles of pain perception. The result, once their idea was fully formed, was an electrifying theory that would become the founding document for the field of modern pain studies and establish the career of Dr. Melzack, whose subsequent work deepened medicine’s understanding of pain and how it is best measured and treated.

Dr. Melzack died on Dec. 22 in a hospital near his home in Montreal, where he lived, his daughter, Lauren Melzack, said. He was 90, and had spent most of his professional life as a professor of psychology at McGill University.

When Dr. Melzack and Dr. Wall, then at the Massachusetts Institute of Technology, met that day in 1959 or 1960 (accounts of their encounter vary), pain perception was thought to work something like a voltmeter, in which nerves send signals up to the brain that reflect the severity of the injury. But that model failed to explain not only battlefield experience but also a host of clinical findings and everyday salves. Most notably, rubbing a wound lessens its sting — and accounting for just that common sensation proved central to the new theory.