There was no dishonor in slaughtering commoners.

Maurice H. Keen, a historian who presented that unvarnished view of the medieval nobility in his book "Chivalry," was one of a small group of scholars in the 1980s who re-examined the record of the chivalric knights, long portrayed in romantic literature as do-gooders, and who found it — with all due respect to Thomas Malory and Walter Scott — incomplete.

There were many do-gooders and brave fellows, no doubt. And the chivalric code did moderate and civilize men's behavior, especially toward women of equal status. But Mr. Keen, who died on Sept. 11, argued that chivalry was mainly a "cult of martial virtues" for men and about men, charting a path to glory, honor and wealth. From about 1150 to 1500, he wrote, obeying its code was the only way for aristocrats to move higher on the social ladder and the only way for commoners to reach the first rung.

"Chivalry, in effect, was a protection plan for the warrior class," said Richard P. Abels, chairman of the history department at the United States Naval Academy in Annapolis, Md., and a professor of medieval history. It was a system, he said, for shielding knights and their families (and no one else) from the worst excesses of war.

Mr. Keen, whose books on medieval history have been taught at the Naval Academy as well as at the United States Military Academy in West Point, N.Y., died in Oxford, England, after several years of declining health. He was 78. His death was announced by Balliol College, where he was named an emeritus fellow in 2000 after four decades as a teacher and administrator.

Mr. Keen wrote or edited almost a dozen books on the Middle Ages. But "Chivalry," published in 1984, was his most influential because it so sharply redefined medieval court life, challenging a view that had been dominant for hundreds of years.

In that view, chivalry was a code of behavior that emerged in the 12th century as a kind of self-improvement guide for men — who spent a lot of time killing — seeking to familiarize themselves with Christian values and humane principles and become gentlemen. It promoted fair fighting, for example, and the protection of women and children.

"Keen said that that was true enough, but only part of the picture," said Clifford Rogers, a professor of history at West Point. "His great insight was that chivalry was synonymous with the law of war — an international body of law agreed upon by the aristocratic classes across just about all of Europe, from the 12th to the 15th centuries."

Mr. Keen's book was among the first to "cut through all the stuff about courtly love and show that chivalry was an important part of the social history of warfare," said C. Stephen Jaeger, a medieval historian and professor emeritus at the University of Illinois.

The code was enforced in chivalric courts. To illustrate how they worked, Mr. Keen cited the trial of a 14th-century knight charged with rape, arson, murder and kidnapping. The knight was convicted and executed — but not for those barbarous acts.

"The knight had carried out his violence after a truce was declared between the two sides in the combat," Mr. Rogers related. "He was executed for violating the truce, not for murder and rape. Murder and rape were accepted as the norm."

Still, for Mr. Keen, the chivalric code was a turning point in social history.

"Its most important legacy was its conception of honor," he wrote, one that incorporated traits still considered the gold standard of human behavior: loyalty to friends, courage in combat, personal honesty, athletic skills, protection of the weak, courtesy toward all and, he wrote, "the constant quest to improve on achievement."

Maurice Hugh Keen was born in London on Oct. 30, 1933, to Harold Hugh Keen and the former Catherine Cummins. His father was a university administrator, his mother an artist. After military service, he graduated from Balliol College in 1957 and earned a master's degree in history there in 1961. He remained a Balliol fellow throughout his professional life.

His survivors include his wife, Mary, and three daughters.

Mr. Abels said he had assigned Mr. Keen's "Chivalry" many times for his Naval Academy class "The Age of Chivalry and Faith."

It is an important source book on the roots of military culture and the social history of warfare, he said — although, he added, "I find myself disillusioning my students year after year when they discover chivalry wasn't what they thought it was."