Sam Shepard made a big entrance into the world of movie acting as the doomed romantic farmer in Terrence Malick's critically acclaimed "Days of Heaven." He has appeared in 40-odd films since that 1978 breakthrough. He has played iconic roles (heroic test pilot Chuck Yeager in "The Right Stuff"), walk-ons (Valerie Plame's father in "Fair Game") and a whole lot of sheriffs.

But rarely has he appeared to enjoy himself so thoroughly as in the new Bolivian western "Blackthorn," which opens Friday in Minneapolis. Shepard, 67, stars as an aging Butch Cassidy, who evaded an army ambush to live out his golden years as a solitary rancher.

A Pulitzer Prize-winning playwright and Oscar-nominated actor, Shepard chooses his scripts with some care. This one offered him several irresistible lures: the best screenplay he had seen in a decade, a nine-week trip to Bolivia's gorgeous high-desert plateau and the chance to ride lots of horses.

"This was a special script, I could recognize that from the get-go," Shepard said by phone last month.

The film is more than a latter-day epilogue to 1969's "Butch Cassidy and the Sundance Kid." Spanish director Mateo Gil, who co-wrote "Abre Los Ojos (Open Your Eyes)" and "The Sea Inside," toys with western lore, imagining the old outlaw returning to his daredevil ways after a long retirement. Cassidy wants to visit America to meet the grown son of Etta Place, who might be his child. A chance encounter with a crooked Spanish mining engineer (Eduardo Noriega) hauls the old fugitive back into trouble with the law.

The role gives Shepard a role to rival Jeff Bridges' Rooster Cogburn in "True Grit." He has richly written dialogue duels with an old adversary from the Pinkerton detective agency (Irish actor Stephen Rea), exciting shootouts and even a raspy-throated singing scene.

The outlaw aspect

"I loved the scope of it, the storytelling aspect and the way it keeps twisting and turning and going through different contortions," Shepard said. "I thought it was quite interesting the way it was structured. And from the very beginning it didn't seem like an exploitive film," riding the coattails of the Paul Newman-Robert Redford classic. "It just seemed very much itself, its own animal."

Making the role his own was an enjoyable challenge.

"I haven't played a big, deep role like that for quite some while. I did some research on it. I wasn't looking to try to recreate who Butch Cassidy was, but to invest in the history and the time of it and the outlaw aspect of it."

An even bigger challenge was shooting at the crest of the Andes, where the air was so thin that the filming locations and the actors' hotel rooms had auxiliary oxygen tanks.

Shepard's first experience of South America was arduous "and also adventurous," he said. "It had a 'Mad Max' appeal to it, like you were really out there on the edge of something. Shooting in a place like Uyuni, which is on the edge of the salt flats, and the high plateau, you did feel that there was a pioneering aspect to it that was kind of great."

"A lot of the time the altitude's around 15,000 feet, so the air was very thin," he recalled. "Breathing was somewhat of a problem. Sometimes we'd travel two hours to the location.

"It's amazing country. When you're out there on the salt flats you have absolutely no orientation. There are flamingoes flying parallel to the car about 6 feet above the salt. You wonder where in fact you are. It's like another planet."

Shepard, a former Stillwater resident who lives in Kentucky and New Mexico, also did a fair amount of high-altitude filming in the upcoming "Darling Companion," an ensemble comedy set for a 2012 release. The film, produced by Minneapolis-based boutique studio Werc Werk Works from a script by Lawrence and Meg Kasdan, was shot in mountainous northern Utah this year. The cast includes Kevin Kline, Diane Keaton, Richard Jenkins and Dianne Wiest.

"I enjoyed it very much," Shepard said. "Great actors. I've worked with Diane many times," memorably as her suitor in 1987's "Baby Boom." "Always love working with her."

Kline and Keaton play a long-married couple whose relationship has sputtered to a stop. She pours her emotions into a stray dog; Kline loses it, and their friends go on a mission to find it. In outline it sounds like a shaggy-lost-dog story, "but what comes out of it is this hilarious conjunction of all these different characters, the way they bang up against each other and the way they deal with the situation. It's a very well-written, funny little script. It's a true comedy."