Nancy Pelosi
Nancy PelosiReuters

Nancy Pelosi was handed back the speaker’s gavel Thursday, after the 116th Congress was sworn in on Capitol Hill.

Pelosi, 78, who represents California’s 12th district, situated entirely in San Francisco, in the US House of Representatives, previously served as House Speaker for two terms, from 2007, following the Democratic sweep in the 2006 midterms, to 2009, and from 2009 to January 2011.

While Republicans had controlled the lower chamber of congress from their 2010 victory in President Obama’s first midterm election until Thursday, Democrats now hold a commanding 36-seat majority.

Democrats retook the House last November, winning a total of 235 seats in the 435-member chamber, while Republicans won just 199 seats. One seat, in North Carolina’s 9th District, remains contested.

Despite dissent within the Democratic caucus and talk of an contested vote for Speaker, Pelosi won nearly all of her party’s votes, with 220 votes for the San Francisco Democrat. Republican Kevin McCarthy received 192 votes.

Some Democrats did refuse to back Pelosi, voting instead for former Vice President Joe Biden, Congressman John Lewis, Senator Tammy Duckworth, Florida Congresswoman Stephanie Murphy, Massachusetts Congressman Joe Kennedy III, Illinois Congressman Cheri Bustos, and failed Georgia gubernatorial candidate Stacey Abrams.