A sportsman can be motivated in many ways to produce his best. For some, a simple professional pride in their performance is enough. Another incentive is colossal sums of money. Others are driven by fear of relegation, public criticism or some other disgrace. Or you can do what a prison of the old West once did - and tell the players that they have a simple choice: either win, or die.

A sportsman can be motivated in many ways to produce his best. For some, a simple professional pride in their performance is enough. Another incentive is colossal sums of money. Others are driven by fear of relegation, public criticism or some other disgrace. Or you can do what a prison of the old West once did - and tell the players that they have a simple choice: either win, or die.

The Wyoming State Penitentiary's All Stars were a faint and short-lived meteor across America's baseball sky in the early years of the 20th century. Surely, however, there was never a team quite like them. To a man they were murderers and rapists, all of them sentenced to death. Back in 1911 in the US, death sentences were normally carried out within a few months, without the 10- or 20-year-long appeal process that is the norm now. The All Stars survived, for a while at least, thanks to a simple arrangement with their prison's baseball-obsessed warden, whose creation they were. Keep winning, Felix Alston made clear to his players, and he would ensure they received stays of execution.

Download the new Independent Premium app Sharing the full story, not just the headlines

This, in a nutshell, is the astonishing story recounted by the screenwriter and historian Chris Enss in her new book, Playing for Time. She had gone to Wyoming to research the role of women in the old West. At the penitentiary, now a museum and a thriving tourist attraction, she stumbled on the strange saga of the All Stars.

Those were the days when baseball ruled the US sporting universe virtually unchallenged. The sun might have been setting on the old West in the years before the First World War, but for baseball they were a first golden age, populated by legendary players such as Christy Mathewson and Ty Cobb, and by "Shoeless" Joe Jackson, perhaps the most haunting figure in baseball history, a naïve superstar who would be caught up in the scandal of the thrown World Series of 1919 and banned for ever from the game.

No less than the crowded cities of the east, vast and empty Wyoming was besotted with baseball. Rawlins' population never exceeded 11,000, but the baseball stadium was always packed, never more so than when the WSP All Stars played. Like the dangerous convicts they were, they entered and left the field chained together in irons. But in their 14-month heyday, between March 1911 and May 1912, they won 39 of their 45 games. In the process, the All Stars forced their way into the amateur Western Division Championship that featured local teams from a vast region stretching from California across the Rocky Mountains.

The only difference was that their opponents played for fun, or in the hope of a career in the big leagues. For the All Stars, baseball was literally a matter of life or death. The only modern parallel is the Saddam-era Iraqi national football team, subject to terrible punishment by the dictator's sadistic son Uday if they lost a game.

Amazing it may sound nearly a century on, Enss's research proved highly controversial in contemporary Wyoming. "A lot of people there didn't like my project," she explains. "They felt it made the state look bad. People had written about the baseball team. But they mostly wrote around the subject, they didn't dig deep. Remember too that Wyoming is the least populous state, and it's not surprising they could keep the story quiet. When I was researching the book, I was astonished how much material seemed to grow legs and walk away." But enough remained for a gripping tale.

No setting could have been more perfect than Rawlins. Today the town is an insignificant way-station along Interstate 80, some 50 miles north of the Colorado border, straddling the US Continental Divide. At the turn of the last century, however, it was a rough-and-tumble railroad town, featuring a particularly savage variant of Western justice. Rapists and murderers would not only be hanged, they might be skinned as well. One local barber's shop actually displayed a pair of shoes made from the skin of one desperado, "Big Nose" George Parrott, who was lynched in 1881. The town was thus the natural home for Wyoming's first state prison.

When it opened for business in 1901, the new penitentiary had neither running water or electricity. Over the years, physical improvements were made, but never enough to dent the place's reputation as one of the toughest jails in the West. Among the famous outlaws who spent time at what was known locally as the "Crossbar Hotel" were Butch Cassidy and Frank James, the brother of Jessie James.

Daily coronavirus briefing No hype, just the advice and analysis you need Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive morning headlines Monday - Friday plus breaking news alerts by email Update newsletter preferences

Then, in 1911, Felix Alston arrived, a prison reformer who believed that a penal system should be about rehabilitation as well as retribution - a concept absent from many so-called "Corrections" institutions in the US today. He laid special emphasis on education, as well as exercise and recreation for inmates, to break the crushing monotony of life behind bars. First and foremost among those recreations was baseball, a sport Alston loved. Not only did he want a prison team, he wanted the best team possible.

Thus the All Stars came into being. Their mascot might have been a picture of innocence, in the person of the warden's blond five-year-old son, Felix Jr, but their line-up was guilty as sin. Alston Sr would run through the team, taking a perverse relish in each player's claim to infamy: "Leroy Cooke is at first. He bludgeoned to death a barber and stole his money." On second was George Saban, "he shot his wife and two children". The third baseman was Jack Carter, who "shot and killed an old hermit, cut him up and burned his remains in the fireplace". The catcher Horace Donavan had murdered his brother-in-law, while the three outfielders had raped and killed eight people between them. As for the pitcher, William Boyer, "he stabbed his father to death with a letter opener". Finally, there was short stop Joseph Seng, who shot to death his former boss after a workplace feud.

If Alston the enlightened warden is one protagonist of Enss's wonderful story, the other is the 29-year-old Seng, a former textile worker from Pennsylvania. He was, by all accounts, a ferocious hitter and a brilliant short stop, who had he not gone to jail might have made it to the major leagues. When try-outs began in the prison yard in early 1911, Seng smashed the second pitch he received through the third-storey window in the guards' quarters. He was the talent who would anchor the All Stars line-up.

The team was taken to play its games in Rawlins City Park in the centre of town, the wooden grandstands packed with fans. The first game ended in defeat by the Rawlins Rustlers. Thereafter however, spurred by their most unusual incentives, they were almost invincible, compiling a 39-6 record over the next 15 months. In their blue uniforms with white edging, the All Stars looked and played like big leaguers. They were also a punter's dream.

Over that 45-game run, an estimated $132,000 was wagered on the team. Three state politicians are said to have raised cash for their re-election campaigns by betting on the All Stars, and a dozen leading local businessmen grew richer by backing the convicts. It was all too good to be true. And so it proved.

A vital cog in the players' mechanism of survival was a Wyoming state Supreme Court judge named Kenneth Farchi, who had both bet on the team and helped secure the stays of execution. Increasingly, however, he found himself under pressure from the families of victims - especially the family of William Lloyd, the man killed by Seng - to make sure that the sentences were carried out. His gambling activities were also in danger of exposure. Farchi wrote to the warden, warning of the "catastrophic consequence that would be visited on this office... if the death penalties are not played out soon." Seng's appeal was moved to the top of pending business at the court.

But the public response was extraordinary. As Seng's execution neared, petitions for clemency poured into the governor's office, not only from his mother and his younger brother, but also from over 350 inhabitants of Rawlins. There could have been no greater proof of how well-known he and the All Stars had become.

Moreover, like other death row prisoners before and since, Seng had became a new and better person behind bars. The callous and cocky youth had matured into a trusty inmate, who was allowed to work in the dispensary. He was then promoted to prison nurse, and his quick thinking more than once saved lives. Seng himself was well aware of the transformation. "I never received a square deal until I was brought to the penitentiary," he wrote shortly before he died. "He believed he lived a fuller life in prison than he ever did on the outside," Enss says. "He was at peace there, and even owned up to the terrible thing he did."

Repentance however made no difference. At 2.45am on the moonlit night of May 24 1912, a day after his final appeal was rejected by Wyoming's Supreme Court, Seng went calmly and bravely to his death, on the gallows that stood opposite the dispensary where he used to work. To all intents and purposes, the All Stars perished with him. Henceforth, Alston announced, the penitentiary team would be made up only of inmates from the general prison population. By 1916 the team was no more. As a former prisoner drily commented in his memoirs, "The ball team didn't amount to much after they hanged Seng." For Leroy Cooke, Horace Donavan, William Boyer and the other players too, time quickly ran out. Only George Saban escaped, never to be recaptured. The remaining 10 were executed, five on the gallows and five in the gas chamber.

Not until 1920 did baseball return to the Wyoming State Penitentiary, and several more years passed before the prison team was allowed to play outside opponents. In 1981 the old penitentiary closed its doors for ever. These days it is a tourist attraction, renamed the Wyoming Frontier Prison. Visitors may spend a night in a cell, and even have themselves locked into the shiny restored gas chamber in which five WSP All Stars met their ghastly end.

But after decades of virtual silence, they may be about to enjoy broad celebrity at last. A British edition of Playing for Time will be published in March. Enss has already written the screenplay for a planned Hollywood film (Nicolas Cage is one actor mentioned for the role of Seng: "the physical resemblance between them is remarkable," she says). It is a story without heroes - or at best with very tarnished heroes - but whose time has surely come.

'Playing for Time' by Chris Enss is published by Arcadia and available from www.amazon.co.uk, priced £9.41