A Silver Spring man yesterday admitted in court that he had attempted to hire a hit man to kill three women he was accused of sexually assaulting.

James Edward Flanagan, 30, was sentenced to 25 years in prison for one of those assaults after making the admission in a Montgomery County Circuit courtroom as part of a plea-bargain arrangement with county prosecutors.

The prosecutors said Flanagan, in jail awaiting trial last March on the sexual assault cases, approached another inmate and offered to pay him $8,000 if he would arrange the killing of two Montgomery County women and another woman in Fairfax County.

The three women were scheduled to testify against him in three seperate sexual assault cases.

Flanagan, a painter, was arrested in Aspen Hill last October after a high speed police chase, and charged with a first degree sex offense involving one Montgomery woman. He was at the time facing similar sex-offense charges for an early incident involving another Montgomery woman. Later, Flanagan was also charged with a similar incident in Fairfax.

According to prosecutor Richard Jordan, after Flanagan made the request the inmate he approached "played along" but then told jail officials who contacted county police.

Police were doubtful at first, Jordon said, but after the inmate passed a lie-detector test, county prosecutors helped get him released on lowered bond. They then sent him back into the jail as a visitor, and wired with a hidden microphone so they could record discussions with Flanagan about finding a hit man.

Two days later, Jordan said, a Maryland state trooper, playing the part of the hit man and also carrying a hidden microphone, was sent to the jail. Flanagan offered the trooper $2,500 for each of the three victims, plus a $500 bonus for killing all three. The trooper told Flanagan he would return in two days, Jordan said.

But when the trooper returned, Flanagan refused to speak to him. Instead, Jordan said, he held up a note asking the "hit man" to leave, saying he believed he was being watched by federal agents. The trooper left, and, a few weeks later, the former inmate was sent in to speak to Flanagan.

Flanagan told the former inmate he still wanted the victims killed, but wanted to "lay low" for a while. When police and prosecutors were later unable to get in touch with the former inmate for several days, Jordan said, they decided it would be safest to end the investigation and charge Flanagan with solicitation.

Flanagan was sentenced to 25 years for the first degree sex offense, with a 20-year sentence for solicitation to murder running concurrently.