D.C. Mayor Vincent C. Gray on Monday announced that he will seek a second term, bringing a sudden end to months of uncertainty over whether corruption surrounding his last campaign would keep him from running for reelection.

The announcement recasts a mayoral race defined until now by Gray’s absence. Ten other candidates, including four D.C. Council members, have picked up ballot petitions for the April 1 Democratic primary — some of them doing so because Gray seemed unlikely to run. The incumbent brings instant name recognition to a field of mostly little known candidates, but also the specter of an ongoing federal investigation into campaign finance improprieties during his 2010 race.

Gray’s decision to pick up nominating petitions comes less than two weeks after the District’s top federal prosecutor suggested publicly that more charges are possible in a long-running investigation into D.C. political corruption that began with allegations of wrongdoing in the last mayoral campaign. Four people affiliated with Gray’s campaign have pleaded guilty to felony charges.

Gray (D) said Monday that he could no longer stand to have his political future dictated by the prosecutors’ timetable.

“It will continue on however long the U.S. attorney chooses to investigate it,” Gray said of the investigation led by Ronald C. Machen Jr. “We have 30 more days to get our petitions in, and I wanted to make sure I at least had that opportunity.”

The candidates

See the Democrats who have picked up nominating petitions for the District's April 1 primary and find candidate profiles and video coverage of the race.

The race had been dominated by discussions of affordable housing, public schools and job growth. Gray’s decision quickly changed that, with several candidates calling on him to explain what he knew of the corruption. His challenge will be to shift the focus to the city’s achievements on his watch as mayor — including a robust economy, declining unemployment and a smooth-running bureaucracy — and away from his legal troubles.

“It certainly makes it harder to turn the page on corruption among our elected leaders, you know,” said D.C. Council member Tommy Wells (D-Ward 6), another mayoral contender who has made ethics reform a central theme of his campaign. Gray’s decision to run, Wells said, sets up a stark contrast for voters.

Gray, who has denied any wrongdoing and has repeatedly declined to address specific questions about the investigation, said Monday that he has no plans to elaborate on any alleged illegal activity in his prior mayoral campaign.

“Look, I’ve done the best job I could to address the 2010 campaign. I think I’ve put a lot to rest,” Gray said after filing his paperwork. “I said, ‘I didn’t do anything.’ That’s the answer I’ve given.”

The prosecutor

Machen and his deputies have been meticulously building a case against D.C. businessman Jeffrey E. Thompson, who court records show is the alleged financier of an illicit $655,000 “shadow campaign” on Gray’s behalf, which went unreported to campaign finance authorities.

According to court documents and people with knowledge of the case, Thompson allegedly funneled money through companies and associates that was spent on get-out-the-vote programs and other efforts to help elect Gray three years ago. The spending was never reported, as required by law.

A spokesman for Machen said Monday that the investigation is ongoing.

In recent weeks, Machen has indicated that legal obstacles have prevented him from quickly wrapping up the probe. He also said late last month that he would press ahead with the three-year investigation.

“We’re trying to gather information, we’re trying to get documents, and we’re trying to talk to people,” he said.

Gray had given little indication that Monday would be the day to launch a reelection campaign. For months, he had methodically brushed off reporters’ questions about his reelection plans, saying only he would make the decision when the time was right.

Less than two weeks ago, the mayor threw a party to raise money for his constituent services fund. While dozens of aides and supporters shouted “four more years,” Gray said his decision would wait for another day. Before that, Gray had attended at least two private, low-key meetings where he heard supporters urge him to run but gave them no indication that he would.

He told reporters that he came to his final decision Sunday, while declining to address what factors weighed in his deliberations or who helped make them. “At the end of the day, it was a conclusion I had to come to myself,” he said.

The day began for Gray with a cold, poorly attended news conference.

A short distance from his Southeast Washington home and in the center of his political base of Ward 7, Gray’s Lincoln Navigator pulled up to the Hillcrest Community Center for the dedication of a multimillion-dollar new playground — the 22nd playground ribbon-cutting during his term.

Robin Marlin, the advisory neighborhood commissioner in Gray’s Hillcrest neighborhood, offered praise for him at her turn at the microphone but left the mayor’s only publicly announced event on Monday thinking a reelection bid wasn’t in the cards.

“We were encouraging, but he never said anything,” Marlin said after learning the news Monday night. Rather, she said, they discussed whether a pergola or wishing well would make a nice addition to the playground entrance.

The kickoff

Gray arrived at the D.C. Board of Elections shortly after 4 p.m. to file his papers. The scene was a far cry from his last kickoff, four years ago

Instead of being surrounded by supporters afterward, this time he was swarmed only by the news media. He was accompanied by a security officer and his campaign manager, Chuck Thies, who said he did not know until Monday that Gray would be moving forward with a campaign.

The long-awaited decision was also announced in an e-mailed letter saying he would “build on the progress and achievements of our first term.”

“Step by step, we are moving our city forward,” he wrote. “We have built strong foundations. But our work is not done.”

Thies said he is prepared to run a campaign under tremendous scrutiny, given the nature of the 2010 allegations. He said he relished the opportunity to help Gray move past the blemish the investigation has placed on his reputation.

“The 2010 campaign is a bum rap, and that’s something we can put to bed with this campaign,” Thies said. “Everyone makes mistakes, and everyone can be redeemed from their mistakes.”

The big picture

At least one of Gray’s opponents, restaurateur Andy Shallal, said he might not have run had Gray made his plans clear earlier.

Three council members — Muriel Bowser (D-Ward 4), Jack Evans (D-Ward 2) and Wells — had announced their plans in the spring.

Reta Jo Lewis, a Democrat and former State Department official, started exploring a race in July. More recently, council member Vincent B. Orange (D-At Large) and Shallal, the owner of Busboys and Poets, have picked up petitions.

Most of the candidates issued statements Monday reacting to Gray’s entry, calling on the mayor to answer more questions about what he knew of the 2010 campaign wrongdoing, if anything, and whether he was involved.

Michael Fauntroy, a Howard University political science professor, said a large field of candidates could benefit the mayor. “If you have three or four candidates dividing the anti-Gray vote, then he wins,” he said. “The bigger the field, the better for him.”

Developer Jim Abdo called Gray’s announcement “great news for the city” because “it forces others in the race to elevate their game.”

The mayor’s announcement, he said, also helps answer lingering concerns about the investigation.

“I think that this is a man who loves the city,” Abdo said. “I would be shocked if he would put the city in a position where it could undermine his effectiveness in a second term. This tells me there isn’t culpability there and that’s why he’s putting his hat in the ring.”

Aaron C. Davis, Paul Schwartzman and Nikita Stewart contributed to this report.

Get updates on your area delivered via e-mail.