A fortnight drama, the likes of which Upper Marlboro had rarely seen, ended last night when the Prince George's County Council rejected the appointment of James R. Taylor as chief of police. Those 14 days were filled with backroom dealings, curious coalitions, secret out-of-state missions and desperate pleas for mediation as Taylor's fate took mercurial turns for better and worse.

On one side was an unlikely alliance of police union leaders and black activists -- traditional foes who for fundamentally different reasons opposed the nomination of Taylor and formed a marriage of convenience to sway the council against him.

On the other side was County Executive Lawrence Hogan, Taylor's benefactor, who on the edge of a bitter defeat unleashed a series of extraordinary maneuvers to counteract the growing sentiment against his choice for chief of police.

One member of the council, Sue V. Mills, said the furious lobbying on both sides was "better than an adventure movie" -- and there were few in this county who disagreed.

For Hogan, the nomination was of such importance that he abandoned his criticisms of Democratic party leaders in the country. The same men and groups of men that months before Hogan had called "machine bosses" were now being courted by the Republican county executive to serve as mediators and powerbrokers for his cause.

Hogan called former Democratic strategist Peter O'Malley, the creator of the very party machine that Hogan said he had cracked during last year's election, and asked him to contact undecided council members regarding the Taylor nomination. He also sought help from former state senator Meyer (Manny) Emmanuel, Walter Maloney, the author of the county charter, and Maloney's son, Tim, a Democratic state delegate. Each eventually agreed to make one or more calls to council members at Hogan's request.

Then, late last Thursday afternoon, Hogan drove alone to the Ebony Inn, a beer and ribs establishment operated by Tommie Broadwater, the black state senator with whom the county executive has had some of his most violent feuds.

Just eight months ago, during a breakfast meeting in Annapolis, Broadwater and Hogan had engaged in a bitter shouting match during which Hogan accused the senator of operating run-down rental houses and Broadwater called Hogan "a liar" and said to him, "You ain't s---."

But there was Hogan at Broadwater's dimly lit bar, showing him background materials on Taylor and asking for a last-minute endorsement that might swing two black council votes into the Hogan column.

Without making a clear public statement, Broadwater indicated to friends that he and Hogan had come to terms. "It was an experience to see Hogan at the Ebony Inn," Broadwater said later. "Hogan really felt he was in a box, and he needed my support. He realized he had to start coming to us and working with us."

The meeting with Broadwater and the pleas for assistance to other powerful Democrats prompted one council member to say of Hogan: "He ran against the Democratic machine, but now he is going to the so-called members of it to help him."

But according to many council members, Hogan could have averted the necessity of such frantic lobbying if he had taken a different approach in unveiling Taylor two weeks ago. after waiting five months for Hogan to select a chief, these council members confessed at the time of Taylor's selection that they were anxious to confirm him and get the whole ordeal behind them.

Hogan, these council members said, managed to turn the favorable odds against him by widely advertising Taylor as a champion of civil rights causes who would polish the police department's tarnished image in the Prince George's black community.

The problem was not that Hogan had picked the wrong issue -- race relations -- on which to base the selection, according to the council members. Nor was it that Taylor was totally unacceptable to black leaders in his previous assignments in Newburgh, N.Y., and Petersburg.

Rather, they said, the difficulty resulted from the belief that Hogan had exaggerated Taylor's record in these jobs; that, in fact, Taylor had no more than an ordinary, mixed record of praise and criticism on racial issues.

Since Hogan had made so much of Taylor's civil rights history, black leaders in Prince George's, who seldom before had been in position to influence the course of county politics, found themselves suddenly able to exert power on the council. Their opposition to Taylor grew stronger as reports came in about the chief's controversial hiring tactics in Petersburg and a discrimination complaint that had been filed against him in Newburgh.

The county police union, which never before has postured as a bastion of affirmative action and racial harmony, quickly joined the anti-Taylor drive at the direction of its president, Laney Hester. The union's primary motive was to get a chief from inside the county department, several sources said, and if it took opposing Taylor and joining with black leaders to accomplish that, so be it.

The marriage of convenience was formed last Monday night when Hester met secretly with Josie Bass, president of the county NAACP. Both Hester's union and the NAACP had been preparing what they called investigative reports on Taylor's background.

Hester and Bass agreed that Taylor's nomination could be stopped cold by a unified stand of blacks and police. Although the alliance was difficult -- the two groups have been polarized for years because of several highly publicized incidents involving white police officers and black citizens -- Hester and Bass knew they had to work together, at least temporarily.

After 24 hours of organizing, Bass and Hester were able to get their organizations to vote against Taylor's nomination, and they called a press conference for the next day to make that announcement.

"At that point," one council leader observed yesterday, "Taylor was stone dead. The coffin was closed and virtualy nailed shut."

But, of course, that was before Hogan exerted his final lobbying blitz. His first step was to attempt to diffuse the NAACP denouncement of Taylor. Hogan's aides encouraged Sylvester Vaughns and Cora Rice; blacks who supported Taylor, to hold their own press conference minutes after the NAACP and police union staged theirs.

At the press conference in Hogan's office, Vaughns and Rice attacked Bass and distributed affidavits they said they had compiled during a recent trip to Petersburg. The affidavits were from black officers in that city who praised Taylor's abilities.

Vaughn and Rice were at the press conference as private citizens, but they had obtained their documents after driving to Petersburg in a county-owned car with a Hogan aide, a friend of the county executive, and an associate county attorney, Larnzell Martin, who was released from his normal duties to help the Taylor cause.

Martin, the only black in the county attorney's office, refused to take part in the political strategy discussions that occupied the time of the other travelers during the two-hour journey and, later, according to several sources, he expressed anger that he had been asked to perform a partisan political task.

With the emergence of some blacks on Taylor's side, Hogan had some new hope as he turned his attention to the council last Thursday and Friday. He spent most of those two days in the council's chambers, a place he has rarely visited before. At those sessions, Hogan concentrated on changing the minds of the two black council members -- Deborah Marshall and Floyd Wilson Jr.

He told them both at one point that if Taylor were rejected, the next police chief nominee might be someone even less palatable to the black community -- someone, he said, like Acting Chief Joseph Vasco, an officer held in generaly low esteem by the blacks of Prince George's.

When Hogan said that, according to sources, Wilson seemed startled and replied tartly: "Over my dead body!"