Ed Cantrell, the former chief lawman of the Wyoming boom town of Rock Springs, was cleared today of charges that he murdered one of his undercover agents.

It took the jury only three hours to return the "not guilty" verdict. Cantrell, 51, then blew a kiss to the jurors and embraced his attorney, Gerry Spence, his family, and tearful well-wishers.

Spence had delivered an impassioned plea for justice in the first-degree murder trial. "If a crime was committed here, it wasn't at the hands of my client," he said in his final argument.

Cantrell was charged with the July 15, 1978, shooting of Michael A. Rosa, a 29-year-old New Yorker of Puerto Rican descent whom Cantrell hired -- after CBS-TV broadcast an expose on drug peddling and prostitution in Rock Springs -- to help him clean up vice in the Sweetwater County seat.Rock Springs, an old Union Pacific railroad town, has seen its population double to 30,000 in the last five years. Its crime rate kept pace as a boom in oil exploration and coal mining attracted thousands of rootless newcomers to western Wyoming.

The trial was moved from Rock Springs to Pinedale, a tiny ranching community 100 miles north, because of local and national publicity on the case. Early press reports on the shooting pointed to the possibility that Cantrell has been involved in a conspiracy to silence Rosa to protect corrupt city officials.

Pinedale's old, red brick Sublette County courthouse was filled to capacity with ranchers, cowhands and lawmen from around the West. Many of them know or have heard about the exploits of the small, wiry Cantrell, described by Spence in his summation today as "the fastest gun in the West."

Sweetwater County prosecutors Robert Pickett and Jack Smith argued that Cantrell shot Rosa between the eyes in a police car outside Rock Spring's Silver Dollar Bar to prevent the deputy from testifying to the state's grand jury about police department irregularities.

But Spence, a 50-year-old Wyoming lawyer-rancher who earlier this year won a $10.5 million judgement against the Kerr-McGee Corp. in the Karen Silkwood nuclear contamination case, argued that some Rock Springs officials -- scared by the CBS investigation and the state's subsequent grand jury probe into corruption -- decided to dismiss out of hand Cantrell's insistence that he shot Rosa in self-defense.

Several defense witnesses testified they heard Sweetwater County prosecutor Bob Bath tell Sheriff James Stark after the shooting, "If you don't arrest Cantrell you can forget the next election."

Stark then took Cantrell into custody and charged him with murder even though, Spence said, the evidence suggested that Cantrell simply outdrew Rosa.

Far from being the zealous undercover narcotics agent the prosecution said Rosa was, Spence said, the slain deputy used the drugs he bought on the street and was worried that Cantrell was going to arrest him the night he was killed.

In dramatic testimony this week, Spence asked Bill Jordan, 69, the Shreveport, La., fast-draw expert whose text on gunplay is required reading in most police academies, to show the court that an older man can outgun a younger one if he continues to practice.

While a 29-year-old sheriff's deputy pointed a cocked revolver at him, Jordan yanked his blank-loaded sixgun out of his holster and pulled the trigger before the deputy could fire. Cantrell, Jordan said, "is probably faster than me."

Spence also produced witnesses who said that the state persisted in prosecuting Cantrell even through it knew that its chief investigator had erred in saying that Rosa's hands were clutching a wine glass when he was shot, that the safety snap on his holster was fastened and that Rosa's gun was on his hip, not cocked in front of him.

Cantrell, Spence told the jury, "is a simple, beautiful man who is too humble, too proud, to talk out against the infamy of his enemies and the despicable cover-up for political reasons by soulless men."