WASHINGTON — Nancy Pelosi, the nation’s first female House speaker, said Friday she will try to keep her spot as leader of the House Democrats despite huge election losses that cost her party the majority.

Pelosi, a California liberal, rejected pressure from moderate House Democrats — and even some liberal allies — who said the widespread defeat cried out for new party leadership.

Pelosi, 70, will seek her colleagues’ support to become House minority leader when the new Congress convenes in January. That would keep her atop the Democratic House caucus, which will number about 190 people next year. But it would mark a big drop from being speaker, which carries tremendous power to influence legislation and is second only to the vice president in the line of presidential succession.

House members elect their respective party leaders, although the entire House elects the speaker. That post is almost certain to go Rep. John Boehner, R-Ohio, the current minority leader.

Pelosi’s decision could set off a fierce battle for the No. 2 leadership job, now held by Majority Leader Steny Hoyer of Maryland. The party’s third-ranking leader, House Whip Jim Clyburn of South Carolina, said he will try to keep the job, which will become the second in command when Democrats become the minority.

If Clyburn – the highest-ranking African American in the House – prevails, Hoyer would be forced out of the leadership ranks. Democratic aides said Hoyer will take a few days to decide whether to compete with Clyburn for the job.

“Our work is far from finished,” Pelosi said in a letter to colleagues. “As a result of Tuesday’s election, the role of Democrats in the 112th Congress will change, but our commitment to serving the American people will not. We have no intention of allowing our great achievements to be rolled back.”

Pelosi said many colleagues “have called with their recommendations on how to continue our fight for the middle class, and have encouraged me to run for House Democratic Leader.”

Dozens of Republican House candidates attacked their Democratic opponents by tying them to Pelosi and suggesting they would do whatever the San Francisco liberal asked.

Several Democratic lawmakers in conservative districts vowed to oppose Pelosi as speaker, but some of them lost all the same.

One who did survive, Rep. Heath Shuler of North Carolina, had said he might challenge Pelosi because the party needs a more moderate leader. Shuler noted that he lost his job as Washington Redskins quarterback in 1997 after the team performed poorly.

As the magnitude of Tuesday’s election losses sunk in, even some longtime supporters of Pelosi said she needed to step aside as the party leader.

“As good a leader as she has been, I don’t think she’s the right leader to take us forward,” Rep. John Yarmuth, D-Ky., told WHAS-TV in Louisville on Thursday. He said Hoyer, who lost two leadership races to Pelosi over the years, would be “a perfect spokesman for the Democratic Party in the House.”

Hoyer is more centrist than Pelosi, and the two have long had a cordial but somewhat wary relationship.