On Sunday, Nancy Pelosi was narrowly re-elected as Speaker of the House of Representatives. Pelosi will now continue to lead the Democratic caucus’ majority and work closely with President-elect Joe Biden, passing the necessary legislation to bring the country back to its feet. It will not be easy.

She faces two significant challenges. First, she works with one of the slimmest House majorities in decades.

Pelosi had recently come under pressure from within the party after a hoped-for landslide victory for the Democrats in both the presidential and congressional elections in early November failed to materialize. Instead of gaining seats in the House of Representatives, the party had lost twelve.

The margin for error has since become incredibly tight, with the Democrats currently holding 222 of 435 seats. At least 218 votes are generally required for a simple majority. Two seats are still vacant due to an open race, another due to a newly elected Congressman’s recent passing.

Providing the aforementioned support for Joe Biden and passing legislation will become a delicate undertaking. After all, only a handful of defectors could ruin any initiative proposed.

Moreover, the slim margin is all the more detrimental, as several GOP members of Congress have aligned their political future with President Donald Trump and his claim that the election was fraudulent. Instead of bipartisan efforts, the Democrats and Pelosi are likely to experience continuous opposition from House Minority Leader Kevin McCarthy and his caucus.

Second, Pelosi faces the mammoth task of uniting her own caucus.

As if the circumstances were not already critical enough, the Democrats continue to find themselves in the middle of an internal power struggle. The moderates and a progressive wing that is steadily gaining influence are seemingly unable to find common ground. After the elections in November, both sides blamed each other for the disappointing outcome. The progressives went even further, claiming that Pelosi was responsible for the losses and demanded a leadership change.

Although only five Democrats broke ranks with Pelosi on Sunday, and albeit no Democrat challenged her for the speakership, this criticism is unlikely to subside anytime soon. In fact, Pelosi’s re-election does not equate to a united caucus, but a necessity, as the alternative would have been losing the speakership to McCarthy.

Alexandria Ocasio-Cortez, one of the progressive wing’s faces, who in the past has been vocal about the need for the transition to new leadership, alluded to this by voting in favor of Pelosi, while still emphasizing that it was not a vote of confidence but a necessity when she stated, “This is bigger than any one of us.”

Moreover, since Pelosi reportedly will not run again in 2022, the doors for potential successors to make their mark and position themselves are wide open, adding yet another dynamic into Pelosi’s task ahead.

The most significant issue remains the party’s political agenda. Demands such as “Medicare for All,” “defund the police” and the “Green New Deal” are sine qua non for the progressives, while moderates argue against it.

With Joe Biden in the White House and a still viable path to a Democratic majority in the Senate, depending on how today’s Georgia runoff election concludes, the progressive wing could put even more pressure on these initiatives moving forward.

Thus, Pelosi will have her hands full holding the caucus together, particularly if she seeks to avoid embarrassing defeats on the House floor due to rebellious Democrats.

If this is indeed Pelosi’s final term, it would conclude a remarkable career spanning more than three decades, including leading the Democratic Caucus for nearly 20 years. But it will also become her most challenging one.