Eric Olson, a progressive Democrat well known for environmental advocacy, was poised to become chairman of the Prince George’s County Council on Tuesday after two years of waiting in the wings. But the vote did not go as planned.

Olson, who served two terms as vice chairman, lost on a 5 to 4 vote to council member Andrea Harrison (D-Springdale). It is the first time in a decade and only the sixth time in council history that a chairman was selected for successive one-year terms.

Although Olson’s opponents would not discuss what was behind their opposition, his backers said that his willingness to challenge key initiatives of County Executive Rushern L. Baker III (D) might have played a role in his defeat. Olson (College Park) has opposed expanding state gaming, part of a Route 1 development plan and a College Park construction deal championed by former Democratic county executive Wayne K. Curry, a Baker ally.

“Until late yesterday, at least six colleagues on our nine-member body had committed their support to me,” he said in a letter to constituents after Tuesday’s vote.

Until late Monday, Olson thought he had the necessary five votes from the council. But Harrison and council member Karen R. Toles (D-Suitland) switched sides, said people who spoke on condition of anonymity to comment frankly about the behind-the-scenes dealmaking.

They added that at least two council members aligned with Baker — Derrick Leon Davis (D-Mitchellville) and Mel Franklin (D-Upper Marlboro) — pushed Harrison’s candidacy. Council member William A. Campos (D-Hyattsville) was attracted to Harrison’s camp by a promise of the vice chairman’s post, but Obie Patterson (D-Fort Washington) was elected vice chairman instead.

After Tuesday’s vote, Harrison said that she had not planned to seek a second one-year term as chairman and that she had promised Olson her vote. But by 4 p.m. Monday, Harrison supporters had lined up Toles, who people with knowledge of the negotiations said had been lured with a promise of the chairmanship of the public safety committee. Toles, who was clocked driving more than 100 mph in February, did not respond to a request for comment.

That left Harrison to decide if she would honor her commitment to back Olson and vote against herself. She said she decided she wanted her job back, adding that the circumstances of her selection were “not comfortable.”

“I got a call to say that ‘we like you and here are where the votes are. . . . I did not lobby,” she said. She declined to name who had urged her to run.

Through a spokesman Baker denied that he played a role in Olson’s defeat, but he praised Harrison before the balloting. “We are moving in the right direction, we are taking Prince George’s County in the direction it needs to go . . . because of your leadership and your work,” he told the council.

But council members who had supported Olson were unhappy with Tuesday’s outcome.

“This is not a good day for this county in my judgment,” said Mary A. Lehman (D-Laurel). “Let’s not sugarcoat this. . . . This is the politics of discord and, I think, frankly, pettiness. ”

She said Campos “had the rug pulled out right from under him in front of everyone. That is the unfortunate downside of politics. It is clearly not for the faint of heart.”

People with knowledge of the vote count said Campos had relied on support from Harrison and Toles, believing he was part of the same coalition that was backing Harrison. Toles and Harrison instead backed Patterson.

Council member Ingrid Turner (D-Bowie), a former chairman, supported Olson as did Patterson.

Andre Gingles, a zoning lawyer who represents the Peterson Cos., developers of National Harbor, said some businesses and politicians worried that Olson’s views and Baker’s did not mesh on economic development.

“Some people think he is too ‘Arlington,’ ” Gingles said, referring to the Northern Virginia county that has become a smart-growth hub.

Del. Joseline Pena-Melnyk (D-Prince George’s), said Olson would have been a capable chairman. “He is a person who has character, who keeps his word when he gives it to you, which is very rare in politics. . . . He would have made a wonderful leader and he is well-rounded and fair.”

Meanwhile, in nearby Montgomery County on Tuesday, council member Nancy Navarro (D-Mid-County) was unanimously elevated from vice president to president, making her that county’s first Latina to hold the post. Council member Craig Rice (D-Upcounty) was elected vice president.