Maj. Michael J. Flaherty was nominated yesterday by Prince George's County Executive Parris N. Glendening to be chief of the county's 900-officer police department, ending months of speculation.

Flaherty, whose most recent assignment was interim director of the problem-plagued jail, would replace Chief John E. McHale. The appointment must be confirmed by the County Council, but Flaherty is expected to have little trouble winning that approval.

Glendening praised McHale, a former FBI agent who was appointed almost four years ago by then-county executive Lawrence Hogan, for his "dedication and loyalty." Glendening said he informed McHale earlier this week that he would be replaced.

Glendening selected Flaherty over Lt. Col. Joseph N. Vasco, who campaigned hard for the job and had the strong support of the Prince George's Fraternal Order of Police.

Glendening said he reached the decision to name Flaherty about 11 p.m. Wednesday, after interviewing a flurry of candidates at the County Administration Building in Upper Marlboro.

Glendening would not identify the other contenders except to say he informed Vasco of his decision at breakfast yesterday.

Glendening said Flaherty initially was not high on his list because he was unaware of Flaherty's "wide professional qualifications," but "of all those mentioned, he's the one I know the best and like the most . . . as a person."

On Tuesday, representatives of black groups told Glendening that Vasco would be unacceptable to them because of his alleged role in the so-called "death squad." A series published in The Washington Post in 1979 revealed that in 1967 Vasco had headed a special police unit that helped informants set up robberies of convenience stores in which police killed two suspects. Although Vasco was absolved of wrongdoing, the disclosures triggered an outcry, especially from civil rights groups.

"Public confidence in the police department is paramount," Glendening said, explaining why he had not chosen Vasco. "He's been completely exonerated. It's unfortunate the remaining negative perception of this police officer would undoubtedly hinder his effectiveness."

Flaherty said he forsees a key role for Vasco. He said he wants Vasco to be his deputy chief, in charge of the department's day-to-day operations, so that the chief can spend more time on community and media relations.

"I certainly would want Joe in the No. 2 position, if that's what he wants to do," Flaherty said.

Vasco began a one-week vacation yesterday and could not be reached for comment. While the second spot is not subject to council approval, some black political leaders expressed reservations about Vasco filling the post.

"There's gonna be as much opposition to Joe Vasco doing that as there was to his being chief," said Del. Sylvania Woods Jr. of Glenarden.

Flaherty, 40, who lives in the south county hamlet of Baden, has a reputation inside the department as a trouble-shooter. He has often been given difficult assignments, including commanding the Seat Pleasant district, a high-crime area with a history of police-community tension.

Amidst a grand jury investigation of rapes at the county jail, Flaherty was given the job of improving security there, and he was temporarily put in charge of the jail after Glendening fired director Arnett Gaston in March. When a new director was appointed, Flaherty continued to assist in the planning of a new $40 million jail.

"When they needed a good man to help out with the jail, they asked for one of our best men. We sent him," said Chief McHale, who called Flaherty "a good selection."

McHale, 57, likened Glendening's action to that of a newly elected president replacing a cabinet officer. He said he is disappointed to be leaving the department but satisfied with his accomplishments in office. He said he plans to "relax awhile" and then possibly return to "my old trade of writing." Before joining the FBI, McHale was a newspaperman.

Opposition to McHale stemmed at least in part from his "outsider" status. Officers complained he had never been a policeman and hadn't risen through the ranks.

"It has always been my strong preference to appoint from within the department," said Glendening at a press conference yesterday. Flaherty, a West Virginia native, has lived in the Washington area since he was four, and holds bachelor's and master's degrees in administration.

"Our staff reviewed the command from major on up," Glendening said, asserting that Flaherty is "absolutely not" a compromise choice, although Flaherty's name wasn't widely mentioned as a candidate. While Vasco swirled in controversy, Flaherty's 18 years on the force got little publicity.

Both men were among four finalists interviewed Wednesday by Glendening staffers for the $50,000-plus position. The county executive said he and his staff deliberated from 5 p.m. to 11 p.m. Wednesday night before reaching a decision.

Earlier in the day, the county's police union issued a statement supporting Vasco's candidacy. Yesterday, Mahlon Curran, Fraternal Order of Police president, described Flaherty as "an excellent police officer . . . the second-best choice" after Vasco. "I'm very angry" with Glendening, Curran said.

Pressures had mounted on Glendening all week to make a decision. On Tuesday, he rejected requests from two black groups to conduct a national search for a new chief. Among those opposed to Vasco was Josie Bass, president of the Prince George's chapter of the NAACP, who yesterday greeted Flaherty's nomination with praise.