Representative Nancy Pelosi of California has decided to stay in Congress and serve as House Democratic leader for two more years, she announced Wednesday morning.

Pelosi, the House minority leader, introduced new Democratic members on Tuesday.

House Democrats had made it clear that she could remain in the position if she decided not to retire, which had been considered a possibility. Her decision puts her at the fulcrum of the impending debate over fiscal issues.

Ms. Pelosi, 72, had been privately weighing whether she wanted to continue in the role given the likelihood that regaining the majority will be difficult in the midterm elections. Her departure would have opened the door to Representative Steny H. Hoyer of Maryland, the No. 2 Democrat, to replace her, but he will have to continue to bide his time.

Surrounded by most of the 61 female members of the House — both the newly elected and old-timers — Ms. Pelosi took a slow windup, extolling the virtues of women in office, before explaining her decision.

“I have made the decision, that some of you may have some interest in, in order to continue work in empowering women, to making sure that our Affordable Care Act is enforced in a way to make sure that being a woman is no longer a pre-existing condition,” she said. “I have made a decision to submit my name to my colleagues to once again serve as Democratic House leader.”

As her staff tried repeatedly to prevent reporters from asking more than a few questions, an animated Ms. Pelosi seemed to enjoy her moment, saying she would use the next two years to help elect more women and to fight the role of money in politics. She became visibly exercised when a reporter suggested that the age of the slate of Democratic leaders — all are over 70 — was preventing younger leaders from advancing in the party.

“You’ve always asked that question except to Mitch McConnell,” Ms. Pelosi said, referring to the Senate Republican leader, who is 70, as a group of women behind her booed and yelled, “Age discrimination!” “Let’s for a moment honor it as a legitimate question, although it’s quite offensive, though you don’t realize it, I guess,” she added before answering: “No.”