House Speaker Pro Tem Adrienne Jones was elected speaker of the Maryland House of Delegates on Wednesday afternoon.

House Speaker Pro Tem Adrienne Jones last week dropped out of the race to become the next speaker of the Maryland House of Delegates, saying it was in the interest of party unity. On Wednesday afternoon in a special session in Annapolis, she got it — just not the way she thought.

Jones was elected and sworn in as speaker on Wednesday after the two remaining candidates couldn’t piece together the requisite number of votes. She becomes Maryland’s first African-American speaker and first woman speaker.

Jones told her House colleagues, “Wow; I didn’t think I would be here at this time when I left my house this morning!”

Del. Maggie McIntosh, chair of the House Appropriations Committee, and Del. Dereck Davis, chair of the House Economic Matters Committee, were also candidates for the job.

But the race was shaping up to be an ugly, bruising affair, with allegations by some delegates of bullying and name-calling. After four and a half hours of caucusing, neither could assemble the necessary 71 votes.

“We were going back and forth,” Jones said after the vote, with Davis and McIntosh standing on either side of her. She said both former candidates agreed with her selection as an alternative.

“If not, we would have still been in the caucus room, probably (until) eight, nine, ten o’clock tonight,” she said.

WTOP’s news partners at Maryland Matters reported that in an early afternoon vote, the Democratic caucus cast 58 votes for McIntosh and 40 votes for Davis.

But Davis had the pledged votes of 42 Republicans, and Democratic leaders became nervous about giving the final say on House speaker to the GOP, Maryland Matters reported; thus, Jones, who had bowed out Friday and endorsed Davis, quickly emerged as the compromise candidate.

Lawmakers were a bit stunned by the turn of events.

“It’s the most incredible experience I’ve had in 28 years,” said Del. Kumar Barve, a Montgomery County Democrat. “We came to a genuine consensus, and we’re 100 percent solidly behind Adrienne, and I think that is a great outcome.”

The Democrats emerged from a House hearing room to announce they had decided to throw their weight — and their 98 votes — behind Jones, Maryland Matters reported.

At Jones’ swearing-in, Davis joked, “’House of Cards’ don’t have anything on us — talk about high drama!” He added, “You were willing to step aside for me, and I am honored to step aside for you now.”

In a reference to the portraits of past speakers in the State House and the fact that they had all been white men, McIntosh said, “These walls will never be the same! We’ve got some new portraits coming, and they’re great!”

Twist in the Speaker contest: Dem caucus nominated a third candidate …see here pic.twitter.com/AnHXr5JzdE — Kate Ryan (@KateRyanWTOP) May 1, 2019

Jones succeeds Michael Busch, Maryland’s longest-serving speaker, who died April 7, one day before the end of the last legislative session. He was 72.

Jones has been a member of the House since 1997 and was the first member of the House to declare her intentions for the post. She led the chamber in the last couple of weeks at the end of the 90-day session, as Busch was being treated for a follow-up procedure to a liver transplant in 2017.

Last month, Jones said that she had been at Busch’s side as speaker pro tem for 16 years. “I learned from the best,” she said, adding that she and Busch shared similar philosophies on leadership.

Jones said at the time that she would do as Busch did, looking to bring out the talents of each member of the House, and added that she didn’t subscribe to a “my way or the highway” approach.

Referring to the 141 members of the House, Jones said “Some of them are real quiet; some, they talk all the time and you know what they’re going to say, but each one of them has something that they can contribute to make a success of the House.”

Senate President Mike Miller called Jones “a natural successor to Speaker Busch” and said he looks forward to working with her.

In a statement, Gov. Larry Hogan congratulated Jones:

I extend my sincere congratulations to Adrienne Jones on becoming the 107th Speaker of the House of Delegates. The election of our first African-American and first female Speaker marks a proud and historic moment for our state. It is also a moment of great opportunity; Adrienne has pledged to be a Speaker for all delegates, and that is exactly the kind of bipartisan, collaborative spirit our state needs right now. I look forward to working with Speaker Jones on our shared priorities and with the entire General Assembly to continue finding bipartisan, common sense solutions.

U.S. Sen. Ben Cardin, a Democrat from Maryland, said in a statement that “This is an exciting day for all of Maryland.” Cardin described Jones as “a friend” who has “worked her way up through the years, building alliances statewide and showing her skills in getting things done to better our state and local communities.”

WTOP’s Kate Ryan, Maryland Matters’ Josh Kurtz and The Associated Press contributed to this report.

This article includes information from WTOP’s news partners at Maryland Matters. Sign up for Maryland Matters’ free email subscription today.