In the movies, it is the bad guys who smoke. Lower class and unsuccessful, the cigarette dangling between their lips is more than a badge of rebellion, it is a sign of evil intent.

The finding, from the first objective study of smoking in contemporary US films, directly contradicts one of the longest held beliefs about Hollywood, that it portrays smoking as glamorous and positive.

"Our study shows the exact opposite is true," Karan Omidvari, who led the research team, said. "Studies have subjectively concluded that movies are attempting to influence different groups of minorities to smoke. We have contradicted these findings as well."

Researchers from New York, San Diego, New Orleans and San Francisco recorded the smoking habits of the five leading characters in all top 10 US box office movies made after 1990 that portray life in the 1990s. They included Blade, in which the evil vampire played by Stephen Dorff smokes while the hero Eric Brooks played by Wesley Snipes does not.

In Face Off, Nicholas Cage switches characters between bad guy Castor Troy and good guy Sean Archer. Only Castor Troy smokes. In Mission Impossible, Jon Voigt plays the villain Jim Phelps who is portrayed with a cigarette clamped between his lips while the clean-living hero Ethan Hunt played by Tom Cruise is tobacco-free. In Basic Instinct, murder suspect Sharon Stone smokes during that notorious police interogation.

In all, 447 movies were studied, of which 193 were R-rated (under-17s must be with an adult). The results showed that just over one in five of the leading characters smoked, about the same as in the US population. Men smoked more than women and whites more than blacks.

But the most striking finding was that bad guys who smoked outnumbered good guys who smoked by almost two to one. Half of all the characters who smoked were lower class. "These findings indicate that the unsuccessful, unglamorous characters light up in movies more than middle-class successful characters," Dr Omidvari said. "This doesn't mean that smoking is portrayed as unattractive by Hollywood. For teenagers, it can be cool to be bad. One of the best examples is the movie Payback in which Mel Gibson plays a thief who is shot by other thieves and left for dead. He recovers and seeks revenge because he wants his money back. In every scene he is in - 13 in total - he smokes a cigarette."

There was more smoking in adult R-rated movies than in those made for family audiences but the highest rates were in independent movies, with almost half of the lead characters lighting up compared to less than one in five in Hollywood movies. The research is published in the medical journal Chest.

The use of films to promote smoking has a long history. Product placement of cigarettes, where a named brand is handled or used by the stars on screen, is a form of promotion that can reach a global audience of many millions. In the 1980s, tobacco companies spent millions of dollars to ensure their products were prominently placed.

In 1989, tobacco firms publicly ended direct financial payments for brand placement in films. But a study a decade later showed there had been an increase in the proportion of films where actors smoked named cigarette brands.

These included Julia Roberts, who pulled a pack of Marlboros out of her purse and lit up in My Best Friend's Wedding, Clint Eastwood, who offered a Camel to Meryl Streep in Bridges of Madison County and Bruce Willis, who smoked Marlboro in The Last Boy Scout.

A more general restriction on marketing practices, including a ban on advertising in films, was introduced in 1998 through the Master Settlement Agreement with the tobacco companies under which they agreed to pay $25bn compensation for the harm caused by smoking.

Robert McCaffree, president of the US Chest Foundation, said: "Movies have long been shown to have a significant effect on smoking. This study updates our previous understanding and emphasises the need for change in this area. We need to increase anti-tobacco messages in coming attractions and films to help educate people, especially children and young adults, about the harmful consequences."