D.C. Council members Muriel Bowser (D-Ward 4), left, and Yvette Alexander (D-Ward 7) join Barack Obama, then a presidential candidate, at a fundraiser for his campaign in June 2007. (Ashlee Clark/The Washington Post)

President Obama announced his endorsement Monday of D.C. mayoral candidate Muriel E. Bowser, lending the support of the nation’s most prominent Democrat to the party’s nominee amid a hard-fought campaign against two independent candidates.

In a statement released through the Bowser campaign, Obama said he was “proud” to support Bowser as “a champion for working and middle-class families, and a passionate proponent of Washington, D.C.”

“As we continue our efforts to move our country’s economy forward, I know I’ll be able to count on Muriel to expand opportunity for all,” Obama said in the statement. “That’s why I’m asking for you to vote for her in the general election this November.”

The possibility of an Obama endorsement has been the subject of much speculation since Bowser won the Democratic primary and embarked on an unusually heated general election race against fellow D.C. Council member David A. Catania (I-At Large) and former council member Carol Schwartz.

As Catania and Schwartz have waged attacks on her record and readiness for office, Bowser has sought to leverage her status as the Democratic nominee in a city where nearly 8 in 10 registered voters identify as Democrats. Obama’s nod will certainly help that effort.

Looking at where key candidates stand on pressing issues facing Washington.

Bowser’s campaign literature and stump speeches have tended to prominently feature her party identification, and on Monday, her campaign e-mailed a solicitation to supporters asking for $44 donations to commemorate the endorsement of the 44th president.

But it’s not clear that Bowser and Obama will appear together before Election Day, and Bowser said she had not personally spoken to the president about his endorsement.

“We know he’s focused on the very important task of running the country, and I’m just very honored and privileged to have his support for our campaign,” she said Monday, declining to detail what led up to the endorsement. “We keep, of course, in touch with the White House. They know what’s going on with our campaign, and he was eager to endorse our campaign.”

A NBC4/Washington Post/Marist poll conducted last month showed Bowser with a lead of 17 percentage points over Catania among likely voters, with a four-point margin of error.

A more recent poll, sponsored by a pro-business advocacy group, found an eight-point margin using a different methodology focusing on frequent voters. That result has a three-point margin of error.

Obama has rarely dipped his toe personally into District politics. He made a 2009 visit to Ben’s Chili Bowl with former mayor Adrian M. Fenty ahead of his inauguration and later invited successor Vincent C. Gray for a White House lunch.

The president and his Cabinet have frequently used the city as a backdrop for announcements, but their involvement in city government affairs has otherwise been perfunctory.

Obama continues to be a wildly popular figure in the District, even as his approval ratings have dipped nationwide. His 2012 reelection bid was supported by 91 percent of District voters, and Gallup pegged his approval rating at 81 percent in an average of surveys taken across 2013.

“They’re proud of our president, and I know they’ll be just as proud as I am that he’s supporting our campaign,” Bowser said of D.C. voters.

The Bowser endorsement is a rare foray into a contested general election for Obama, who in this election cycle has most frequently endorsed Democratic incumbents facing tough primary races. Among Obama’s recent endorsees are Sen. Brian Schatz and Gov. Neil Abercrombie of Hawaii, Rep. Marc Veasey of Texas and Rep. Mike Honda of California.

His approval has not guaranteed victory. Abercrombie lost, as did San Diego mayoral candidate David Alvarez, who was beaten in a February special election by Republican Kevin Faulconer days after the presidential endorsement.

Other Democratic mayors to have recently received Obama’s endorsement — including Bill de Blasio of New York, Annise Parker of Houston and Mitch Landrieu of New Orleans — coasted to victory.

When asked on what issues she might seek Obama’s help should she be elected, Bowser said she would urge him to grant additional funding for Metro, better manage federally owned land in the city for the benefit of residents and do more to create affordable housing.

She did not mention D.C. voting rights. Obama’s efforts in that realm have been a point of controversy among District activists, who were annoyed when Obama agreed to reimpose a ban on using D.C. government funds for abortions as part of a 2011 budget deal but were heartened this year when he spoke approvingly of D.C. statehood.

Schwartz responded to the endorsement by suggesting that Obama go beyond supporting a candidate to “use his good offices to actively help us in our ongoing struggle for greater autonomy and full voting rights.”

Catania’s campaign portrayed the endorsement as evidence of a tightening race. “It’s an endorsement that’s to be expected,” campaign manager Ben Young said. “I think it’s clearly an effort to blunt what’s undeniable momentum for David.”

At a midday rally, Bowser dismissed the critics by referring to the speculation over whether Obama would endorse her: “My opponents were saying, ‘Where is the president?’ Well, the president is with us.”

For a full text of Obama’s statement, please go to www.washingtonpost.com/local/dc-politics.

Aaron Blake and Scott Clement contributed to this report.