D.C. Council member Muriel E. Bowser (D-Ward 4) won big Tuesday to become the next mayor of Washington, D.C., defeating independent candidates David A. Catania and Carol Schwartz in a hard-fought contest. (NBC Washington)

Muriel E. Bowser defeated independent candidates David A. Catania and Carol Schwartz in a hard-fought contest for D.C. mayor that, in the end, confirmed the dominance of the Democratic Party in the nation’s capital.

On a night when Democratic candidates across the nation suffered a drubbing, final tallies Tuesday showed Bowser, a seven-year D.C. Council member, outpolling her rivals by nearly 20 percentage points.

Bowser, addressing hundreds of supporters near Howard University, called her victory a “resounding affirmation” of the city’s “Democratic values.”

“Hard-fought elections force us to dig deep, to question, to reach for big and bold visions, and define our core values,” she said. “They test our mettle, our wherewithal and our stamina, they make us be accountable to you, and I am grateful for the 19 months that I fought.”

At a gathering just blocks from Bowser’s, Catania acknowledged that the race “had not turned out as we hoped” and congratulated his fellow council member while also vowing to keep working for the District after 17 years as a lawmaker. Catania gave up his at-large seat to run for mayor.

Catania’s concession marked the end of what many had expected would be a historically competitive election. Instead, Tuesday’s results demonstrated that, as much as the city has changed, its long-standing political dynamics remain intact.

“Today’s outcome affirms that you want to be proud of your leadership and your leaders,” Bowser said. “We are Washington, D.C., and I pledge tonight that I will make you proud.”

Bowser, who represents Ward 4 on the council, said, “You told me then to carry a positive message, you told me to speak about my own vision, you told me to conduct myself with integrity, to be a woman of my word, to work harder, longer and smarter than anybody.”

D.C. voters went to the polls Tuesday to pick new leaders for a fast-changing Washington and to decide whether to legalize marijuana possession in a city wrestling with its prosperity, lingering inequalities and traditions. Residents voted to legalize marijuana possession.

“I just want it to stay Washington, you know?” said a young construction worker after voting for Bowser in Brookland.

Bowser, 42, an African American who will be the city’s first female mayor in 20 years, battled Catania, 46, who was seeking to be the city’s first white, openly gay mayor, and Schwartz, 70, a former council member.

Come Jan. 2, Bowser will be greeted with a host of issues, among them a housing crunch that has affected residents ranging from young middle-class households to the very poorest families, whom the city continues to house in motel rooms and a dilapidated former hospital.

D.C. Mayor Muriel Bowser (D) talks to reporters at the National Press Club on Wednesday following her win over David Catania (I). (National Press Club)

A high-stakes deal to finance a stadium for the D.C. United professional soccer team also appears destined to land in the new mayor’s lap. The success of the marijuana initiative could put Bowser in a standoff with Congress over its implementation.

And while the city continues to prosper by most measures, Bowser could face a significant budget gap: The District’s chief financial officer warned in September that $50 million or more might need to be trimmed from the city’s spending next year because of declining revenue from traffic cameras.

Bowser staked her 19-month campaign on the idea that the growing District remains on the right track but that more should be done to address the needs of those left behind by the city’s 15-year economic boom. She also promised to turn the page on years of political scandal.

Catania bet that the city, buffeted by years of scandal, was ready for a more wholesale political overhaul. He set out to prove himself the more able and aggressive leader — an image he tended with more than 100 visits to city schools and dozens of living-room meet-and-greets, and through the release of an extensive policy platform.

As the campaigns closed across the city, voters made their choices.

At the Latin American Youth Center, a busy polling center in the heart of the District’s Hispanic community in Northwest, a steady stream of white and black voters lined up after dark to cast ballots.

Phyllis Greene, 76, a retired mail clerk who lives in a senior center nearby, said she voted for Bowser in part because she was the only candidate who came to meet people at a barbecue in her building.

“She was very nice, but she also seems strong, like someone who won’t let others push her around,” Greene said. “I like that.”

Earlier in the day, Amosniece Brown, 22, a Montgomery County college student who lives in Ward 8, said she voted for Bowser: “I like women in power. It took us a long time to get there.”

Ronda Smith, 44, a student in criminal justice at Westwood College in Arlington, said she has lived in Ward 6 for 30 years. Her vote went to Catania.

“He pushed $80 million into education for schools. Education of young people is an extremely important issue,” she said. “I went back to school at 41.”

In the Takoma neighborhood, an energy sector consultant said she was backing Bowser. “I liked her. I see no reason she won’t be a good mayor,” said Carol Mulholland. “What I don’t like about Catania is his inflexibility on a number of positions.”

Justin Schor, 43, another resident of the Takoma neighborhood, abandoned Bowser in favor of Catania.

“I voted for Muriel the last time, and she hasn’t taken a stand. I’m more pro-development. She hasn’t supported issues that are important to me,” said Schor, a transportation manager. “I just feel Catania has more citywide experience.”

Schor said he voted in favor of decriminalizing marijuana: “It takes away the black market and all the illegal activity. It’s a fairly harmless drug.”

Al Sevilla, 60, a lifelong Washingtonian who comes from a “cop family,” said he, too, voted to legalize marijuana possession in the city.

“I don’t think I’ve smoked pot since 1972,” Sevilla said. But if Initiative 71 passes, the law enforcement photographer said he’s going to try marijuana to treat symptoms associated with the loss of his right leg a decade ago, after developing an infection.

The city’s medical marijuana program, he said, is too difficult to navigate. And he said he also would like to see police priorities adjusted: “I need cops to be on the street, not looking at every kid who smokes a joint.”

Andy Feeney, 65, a retired legal proofreader who lives in Ward 1 in Mount Pleasant, said he voted for Schwartz.

“She got the tenant organization’s endorsement,” he said. “I went to their meeting, and she made a pretty good showing. She was funny. She said: ‘Hey, I have run three times. You voted for everyone else. Give me a chance.’”

Outside Coolidge High School, a couple pushing their infant son in a stroller said they split the vote in the mayoral race.

“I saw Muriel speak, and I wasn’t thrilled with some of the answers,” said Lauren Strange, 31, who lives in Brightwood with her husband, Bryan Pashigian, 31, and their 12-week-old baby, Walter. “There was not a lot of detail. I thought she was a little defensive.”

Strange said it was a tough decision; she was not thrilled with either candidate.

“We live in Ward 4,” she said. “It’s not that I dislike her. I was just not overwhelmed with her platform.”

Pashigian, a mental health therapist, said he voted for Bowser: “I think part of it was living in Ward 4 and her being our council member. Things have been going well.”

Richard James, a 36-year-old construction worker, held his 18-month daughter, Amelia in his arms as he emerged from the polls at Bunker Hill Elementary School in Brookland.

He said he had voted for Bowser — although he said he wasn’t especially enthusiastic because he was not a fan of former mayor Adrian M. Fenty, Bowser’s political mentor.

But he said he thought Bowser would do a better job of keeping the city in touch with its roots as change continues to pulse through the city.

“I just want it to stay Washington, you know?” James said. “I hope she has that sense of keeping it Washington.”

Bowser entered Election Day with the organizational and financial advantage of a Democratic nominee in an overwhelmingly Democratic city. But there remained the uncertainties of a wildly changed city.

Washington is no longer majority-African American, is eager for school improvements and displays some hard-to-reconcile paradoxes, such as residents being largely content with the city’s direction, yet uncomfortable with the growing gap between haves and have-nots.

Tuesday’s result was a rare but decisive setback to Catania, who had shaped the city as an ambitious lawmaker. But his accomplishments could not outweigh his identity — an openly gay white man who, perhaps most devastatingly, was never a Democrat.

Schwartz, underfunded and not quite the household name she was a decade ago, attracted some support from a cadre of longtime residents but never seriously threatened to triumph.

Pamela Constable, Michael E. Ruane and Robert Samuels contributed to this report.