The names have been changed to protect...the guilty?

Ridley Scott's long-awaited war movie Black Hawk Down may claim to be a true story, but its portrayal of one American soldier is apparently far from exact.

In fact, one of the military heroes depicted in the film is now serving a 30-year sentence for raping and molesting a young girl.

The war drama, about the U.S. military's botched raid in Somalia, stars Ewan McGregor as Ranger John Grimes, one of 100 elite U.S. Army Rangers pinned down in Mogadishu under heavy fire from a Somali militia, after two of their Black Hawk helicopters were shot down. The operation led to the deaths of 18 U.S. troops and became the longest sustained ground action by American forces since the Vietnam War.

But in reality, McGregor's Grimes is based on real-life Army Ranger John "Stebby" Stebbins, who, aside from being a hero in the Battle of Mogadishu, is now a convicted child molester.

The Army purportedly tried to hide that fact when Scott and company began shooting Black Hawk Down. Mark Bowden, author of the original bestselling book and its screenplay, told the New York Post he was pressured by Pentagon officials to change the name of Stebbins to Grimes to avoid the controversy.

"As it happened, Stebbins got in trouble with the law," Bowden told the Post. "The Army asked us to change the name."

Stebbins, now 36, tried three times to enlist in the military during the Persian Gulf War and was turned away before finally being accepted into the Army's formidable Ranger unit.

Relegated to desk clerk duty and labeled "chief coffee maker" by his peers until called into action, "Stebby" reportedly surprised his fellow soldiers with his bravery and was eventually awarded the Army's distinguished Silver Star--one of the military's highest honors--for his heroism during the bloody battle.

While he proved to be a tough fighter during the botched operation, Stebbins eventually ran afoul of the law. He was court-martialed on June 8, 2000, for sexually abusing a child under the age of 12 and sentenced to 30 years in Leavenworth military prison in Kansas, where he now resides.

Despite the name change, Stebbins' conviction blanketed the movie in controversy. His ex-wife, Nora Stebbins, wrote an email to the Post objecting to the movie making a hero out of a convicted sex offender.

"[Producers] are going to make millions off this film in which my ex-husband is portrayed as an All-American hero, when the truth is he is not," she wrote.

For his part, Bowden acquiesced to the Army's wishes and used Stebbins' real name only in the book, but not in the screenplay.

Revolution Studios, the company which produced the picture, did not immediately return a call for comment. But a company spokeswoman told the Post that the change was made for "creative" purposes.

"There were 100 men in the battle and only 40 speaking parts, so we had to condense some of the characters," said the spokeswoman. "[Grimes] is one who is a compilation of a number of soldiers who fought in that battle so his name was changed."

Meanwhile, Black Hawk is being heralded as one of this year's top awards contenders, but the film was shot down by the Golden Globes Thursday, coming away with no nominations.

The $95 million war flick lands in theaters Christmas Day.