"Pronouncing Doom" is a story by S. M. Stirling. It takes place in 1999.
Juniper Mackenzie rides to Dun Carson to pronounce sentence on a convicted rapist. The rapist tries to maintain that his guilt has not been proven in spite of testimony to the contrary. Juniper has to remind him that he has already been convicted and that she is present to pronounce his sentence. She sentences him to be executed and buried with the weapon of his execution (a spear) protruding from his grave. She also chides the population of Dun Carson for not looking after the welfare of one of their own, the woman who was raped.
Juniper makes the members of the dun draw lots for those who will dig the grave, execute the rapist and fill in the grave. After the execution, Juniper returns home.
Note: When Rudi is a man he contemplates the fact that the punishment for rape is to be buried alive at a crossroads with a spear protruding from the ground to ease the earth's pain.