One year ago, after earning a national reputation as a mecca for vice, this gray, gritty boomtown hired a tough undercover cop from Spanish Harlem to help clean up the mess.

But one day after Michael Angel Rosa was invited by a Wyoming grand jury to deliver testimony he said would implicate officials "all the way to Washington, D.C." - and 72 hours before he was to testify - in the best traditions of the American West he was gunned down, allegedly by the man who had hired him.

Rosa, 29, was shot between the eyes in an unmarked police car a week ago outside the Silver Dollar bar, witnesses say, by Rock Springs Public Safety Director Ed Cantrell. Rosa had been using his cover as a bartender there to investigate drug trafficking and related prostitution and gambling in Rock Springs. Police say those vice activities are worth between $2 million and $5 million a year.

Cantrell, 50, is being held without bail on first-degree murder charges in an undisclosed location somewhere in Wyoming, "for his own protection," police said.

The killing has touched off a wave of indignation and speculation in Rock Springs, an old Union Pacific railroad and mining town that doubled in size almost overnight to 25,000 persons six years ago when a half-billion-dollar coal-fired power plant serving Utah, Idaho and Wyoming was built here.

Thousands of blue-collar workers poured into Rock Springs to work on the Jim Bridger Power Plant, many of them living 20 to a trailer or even in holes covered with plastic sheets in the desert because of the shortage of housing.

The sudden influx was more than the social fabric of Rock Springs could bear. More than $700,000 in new payroll cash came to town each week.

Long accustomed, like many hardbitten western towns, to tolerating its share of vice, Rock Springs found itself assiled by hordes of prostitutes and then by a flood of hard drugs. Gambling became a way of life in many private homes and in the back rooms of saloons.

But it grew accustomed to a nightlife plagued with frequent killings and brawls as a mixture of tired, dirty, heavy-drinking cowboys, oil rig workers, coal miners and construction men, some of whom earned $600 a week, let off steam.

The town gained notoriety a year ago, when CBS "60 Minutes" aired a dramatic two-segment expose on vice in Rock Springs. Not long after the show, Rosa was hired by Rock Springs, and Wyoming set up a special statewide grand jury to investigate corruption charges.

Rosa's death, which the grand jury is investigating, was unusual even for Rock Springs, where there have been 12 murders in the last 18 months. There were many questions and very few answers.

What type of evidence did Rosa have, and who was he going to implicate? irate citizens were asking. Was there, as his wife claims, although she did not report it to authorities, really a breakin at Rosa's trailer a few hours after he was killed? And was a manila envelope containing all his undercover work stolen?

Why would Cantrell, a veteran Wyoming peace officer with a good record, kill a man who had told his wife only a week before that his life was in danger but that Cantrell was the only man on the Rock Springs police department he could trust?

If Cantrell were acting to protect "higher interests," as some allege, why did he shoot Rosa the way he did - with two other policemen in the car in the parking lot of one of Rock Springs' most popular watering holes at 1 a.m. on a Sunday morning when it was packed with customers?

"There was no better shot in the state of Wyoming than Ed Cantrell," said Robert C. Overy, a lieutenant in the Rock Springs police department. "He could ding a frog at 1,000 yards. If Ed was acting to protect people higher up he could have lured Mike out somewhere and used a high-powered rifle on him."

Was there something else in Rosa's character that provoked Cantrell? some ask. Rosa's mother-in-law, Georgia Smith of Prince Frederick, Md., described the former Marine Corps sergeant with two tours in Vietnam as a "Charles Bronson type. Oh, he was an arrogant, proud man, and he thought he was the best there was."

Smith said Rosa developed a "hatred for drugs" as a teenager, when two of his brothers, one of whom later died of an overdose, became hooked on heroin.

A small, wiry man who wore his hair in an Afro and who had a hard, muscular face, Rosa drifted to Wyoming from Maryland when a fellow cop moved there.

He went undercover, specializing in drugs, and came to Rock Springs, he told friends, when a contract was put on his life in Gillette, another Wyoming boomtown. He had engineered that city's biggest drug bust ever.

The shooting occurred after Cantrell and two senior Rock SPrings detectives had spent a whole day trying to find Rosa to persuade him to change unknown parts of his grand jury testimony, an agent for the Wyoming attorney general said in an affidavit this week.

At one stage in the search for Rosa, the agent said, Cantrell allegedly told the two other officers, "Maybe we ought to take the S.O.B. out and kill him."

The three policemen caught up with Rosa at the Silver Dollar. One of them, James Callas, told the agent he remembered Cantrell asking Rosa to get into the car's back seat to write down "your date of birth" for police deparrtment records.

Callas did not see Cantrell turn around and and fire the shot, he said. He said he heard Rosa ask, "What do you want, you?" and then the shot was fired. "Good God Ed, why did you do that?" Callas said he asked.

Cantrell only replied with a "cold stare," he remembered. And then Rock Springs' top lawman allegedly asked the other officer, Matt Bider, to take his gun out and throw it on the floor of the car at Rosa's feet as if Rosa and tried to draw. Bider refused.

Later, Cantrell reportedly told investigators he shot Rosa because he thought he was going for his gun. "I could see it by the look in his eyes," he allegedly told investigators. But they found Rosa's revolver firmly holstered under his shirt.

As word of the shooting spread, angry citizens of Rock Springs flooded the town's three radio talk shows with questions and accusations.

On clergyman, the Rev. Herbert Scott, said, "The killing reflects the reaction of the kind of elitist leadership that has run Rock Spings for too many years to what it perceived as a threat."

In the aging, gray sandstone building that houses the police department, seven of the 16 men in uniform threatened to resign. Said police Lt. Overy, "If morale was sand, we wouldn't have enough to stuff a mosquito's a-."

Overy said the department was "crippled" by the fact that it had grown from only 11 to 16 men since the boom began. The number of calls it received, he said, exploded from 8,800 to 106,461 last year. "Things really got out of hand when the boom began," he said. "It got to where we could only answer the most urgent calls. We had to, we still have to, choose between a man holding a knife on another man or a barroom brawl."

The killing of Rosa prompted Wyoming's governor, Ed Herschler, to assure special prosecutor Lawrence Yonkee Friday that he would provide more funds to the grand jury to allow it to continue its work. Earlier, Yonkee said investigations had exhausted the grand jury's $140,000 budget.

Yonkee announced that, tomorrow, he and a staff of agents will establish an office in Rock Springs to look into vice and to investigate the murder of Rosa. "Any time a grand jury witness is killed, he said, "a thorough and long investigation of that event is warranted."

Although Rosa's widow told what she knew to the grand jury last week in Cheyenne in her husband's place, Yonkee said he did not know what evidence Rosa had and that it would be his task to discover what it was while he was in Rock Springs.

The grand jury has indicted several prominent Wyoming officials.

Two have been convicted for embezzlement: George Nimmo, former director of the Wyoming Law Enforcement Academy and acting head of the attorney general's criminal investigation division, and Lloyd Hovee, former secretary of the board of charities and reform.

Frank Mendicino, the attorney general, is on a leave of absence pending disposition of severalcharges against him, including interfering with a drug investigation and failure to prosecute Nimmo and Hovee.

In Rock Springs, speculation over the motive for Rosa's killing and on what a parade of witnesses from the city told the grand jury last week, continued unabated.

The witnesses ranged from the county coroner to Loretta Crider, co-owner of the A&D bar, one of Rock Springs most notorious establishments.

But activity on K Street - the dingy hub of vice in Rock Springs - had not changed this weekend. Elegant hookers in large, highly polished Cadillacs bearing out-of-state license plates, cruised the cold, windy streets as their pimps shot pool in shabby bars with cowboys and construction men.

"You can't tell me it wasn't premeditated," said Larry Tyson, a steel-worker. "You don't call a man out you hired to ask him how old he is and then shoot him between the eyes without having something on your mind."

But the establishment also has its defenders. Said Overy: "The police department has no comment on the shooting. But I can personally say I believe it was the act of one man against the other with no conspiracy involved. What triggered it, however, I just don't know."