"All I want is to enter my house justified."

Sam Peckinpah's father used to tell him that, and years later it would become the motto for "Ride the High Country," a movie that critic Pauline Kael called "the last good western."

Peckinpah died yesterday in a Los Angeles hospital of a heart attack at the age of 59 and it's hard to think that he ever entered his house, or anyone else's, feeling unjustified. His movies will be remembered most for their violence and strange, elegiac longing for the old western frontier.

Peckinpah was always the subject of criticism. And yet he did little to soften his style or his image. His face was leathery, his voice parched and low, his eyes as quick and narrow as an iguana's. For the benefit of interviewers, he would wear a red bandana and a beat-up old hat and hit back at his critics.

In "The Wild Bunch" (1969), cowboys and women and children were blown apart in a slow-motion ballet of bullets and blood and desert dust. When critics called the violence gratuitous, Peckinpah said he had "tried to show violence as it is," that he wanted "to show that people we identify with, even approve of, did some terrible things."

When "Straw Dogs" was released in 1971 and shocked audiences with its scenes of rape and killing, 13 of Britain's leading film critics wrote a letter to The Times of London demanding to know why the British Board of Film Censors had passed the film. Kael called "Straw Dogs" a "fascist work of art."

"If I'm a fascist because I believe that men are not created equal, then all right, I'm a fascist," Peckinpah replied.

During the filming of "The Wild Bunch," a friend of Peckinpah's introduced him to the writing of Robert Ardrey, an ethnologist who wrote of the animal nature in man. Peckinpah called Ardrey "the only prophet alive today."

"Everybody seems to deny that we're human. We're violent by nature," Peckinpah once said. "We're going to survive by being violent. If we don't recognize that we're violent people, we're dead. We're going to be on some beach, and we're going to drop bombs on each other. I would like to understand the nature of violence. Is there a way to channel it, to use it positively? Churches, laws -- everybody seems to think that man is a noble savage. But he's only a meat-eating, talking animal. Recognize it."

Peckinpah saw himself as a son of the changing West.

His ancestors emigrated from Holland and moved west across this country in a covered wagon during the 19th century. They settled in Madera County, Calif. With his father Judge, his mother Davis, his brother Denver and his sister Fern Lea, Sam Peckinpah grew up on the family ranch beneath Peckinpah Mountain in the foothills of the Sierras. As a child, he loved to fish and hunt and ride horses through the hills.

"That world is gone," Peckinpah said years later. "I feel rootless."

Peckinpah's father was a moral absolutist who tried to instill in his son a sense of discipline by sending him to the San Rafael Military Academy and by forcing him to sit through the trial of a teen-aged boy charged with statutory rape.

Peckinpah served with the Marines in China during World War II. Of that experience, he once said, "The Communists cut the Peking-Tientsin railroad and they pulled us out. But I didn't want to leave. I wanted to stay in Peking . . . I was in love with a Chinese girl . . . Maybe, in a funny way, I've been trying to go back to China ever since."

He returned to the United States and enrolled at Fresno State College, where he directed a production of Tennessee Williams' "The Glass Menagerie." He worked as an actor and director for a summer-stock theater in New Mexico and for a television station in Los Angeles. Liberace, the master of glimmering couture, fired Peckinpah from a TV special when he refused to wear a business suit instead of blue jeans to work.

Peckinpah worked at the writer's trade during the 1950s. He wrote scripts for "Gunsmoke" and helped finish the screenplay for "The Invasion of the Body Snatchers."

As a director, Peckinpah made some awful movies. "The Getaway," "Bring Me the Head of Alfredo Garcia," "Pat Garrett & Billy the Kid" and "Convoy" are unlikely to enhance his reputation in any circle. The scene in "Straw Dogs" in which Susan George begins to enjoy being raped is possibly one of the most repellent moments in recent film history.

"The Wild Bunch," like Samuel Fuller's "Shock Corridor," continues to have appeal as a titillating, if limited, work. Peckinpah, who saw his own version of the West lost to development and time, was obsessed with the theme of change. "The Wild Bunch" depicted the last raucous, bloodthirsty burst of violence from a gang of outlaws, but Peckinpah also treated his theme in gentler ways.

In "The Ballad of Cable Hogue" (1970), Jason Robards plays a destitute man abandoned by his friends. But he discovers water "where there wasn't none," a discovery that makes him prosperous. He falls in love with a prostitute played by Stella Stevens and, for a while, they live together happily. Eventually, she leaves. The automobile makes the watering hole obsolete. The old man is hit by a car and dies. "The Ballad of Cable Hogue" won the plaudits of numerous critics and made the Ten Best list of The New York Times in 1970, but it was a box-office failure.

Peckinpah moved around a lot, living in London, on the beach in Malibu and on a ranch in Nevada. His home for the last 11 years of his life was in Mexico.

He always kept a photograph with him of the first buck he ever shot. He was an avid hunter and cooked the beasts on an outdoor spit. He despised hunters who carelessly left carcasses to rot.

As a hunter, Peckinpah always ate what he shot. He was not afraid of violence. He embraced it, rejected it, tried to understand it. For all his mistakes, the same was true of his attempt through the movies to learn about violence. Sam Peckinpah entered his house justified.