Senate Majority Leader Harry Reid gestures as D.C. Mayor Vincent Gray approaches during a news conference on the government shutdown at the Senate steps on Oct. 9. (Alex Wong/Getty Images)

The cheers rang out, and Vincent C. Gray put his fist in the air. As it pumped, the crowd chanted: “Free D.C.! Free D.C.! Free D.C.!”

Ten days into a federal shutdown posing unprecedented challenges to the city’s governance, the mayor had just told a crowd of hundreds how congressional inaction threatened the health, safety and welfare of D.C. residents. The District, he warned, is in uncharted territory.

So is Gray.

Nearly three years into a scandal-plagued tenure that at times has seemed destined to end after one term or in a resignation, the shutdown has capped an extraordinary month.

Just weeks before he must decide whether he will run again, Gray (D) is undeniably invigorated by recent events: a victory in his effort to lure Wal-Mart to the District, the national profile he garnered while consoling a grieving city after the Navy Yard shootings, and now, in the shutdown, a pulpit from which to rail against federal oversight of the District.

The 70-year-old mayor continues to offer no hints about his plans. But for some around him, a once-
unthinkable second term has come into view.

“He’s showing that he’s got some street fighter in him, and I think that’s played well for him,” said Tony Bullock, a federal lobbyist who served as communications director for former mayor Anthony A. Williams. “People like to see their mayor fight for the rights of the District, and he’s shown he doesn’t mind mixing it up with the big boys. Even people who are not fans of Mayor Gray are saying, ‘Way to go.’ ”

They have also pushed aside, for the moment, the more negative scrutiny that has characterized Gray’s time as mayor, as well as the assumption that he had not declared plans to run again because he had no such plans — nor much hope of winning.

Until now, an ongoing federal investigation into Gray’s 2010 campaign had defined his tenure. It started in early 2011 with allegations that the mayor’s campaign made relatively small cash payoffs to a fellow candidate but expanded last year to encompass a secret “shadow campaign” on Gray’s behalf allegedly financed by businessman Jeffrey E. Thompson.

Gray has not been charged with a crime. He initially denied any wrongdoing but more recently has declined to comment altogether on the investigation.

The inquiry remains active and has come within arm’s length of the mayor, with one of his closest political confidants, Vernon E. Hawkins, pleading guilty in August to a felony charge of making false statements to authorities. A federal grand jury reviewing evidence in the case met as recently as last week, according to a subpoena reviewed by The Washington Post.

Gray is running out of time. An unusually early April 1 primary means the customary rhythms of a D.C. mayoral race are five months ahead of schedule. As Gray was giving his address Thursday, the slate of declared candidates for his seat were preparing campaign finance reports due later that night.

Four candidates — council members Muriel Bowser (D-Ward 4), Jack Evans (D-Ward 2) and Tommy Wells (D-Ward 6) as well as former State Department official Reta Jo Lewis — have together raised $2 million for their mayoral campaigns. Other potential candidates, including restaurateur Andy Shallal, former deputy mayor Eric W. Price and former city administrator Robert B. Bobb, are considering whether to run.

More crucially, the widely recognized deadline for Gray’s decision — Nov. 8, when ballot petitions are made available by the city’s Board of Elections — is fast approaching.

Aides to Gray say they have seen no concrete indications that he is any closer to launching a campaign. Some observers think he has decided not to seek a second term and is merely delaying a lame duck’s slide into irrelevance.

Either way, happier headlines have dominated as Gray approaches the final year of his term.

Last month, Gray claimed victory in a hard-fought battle between advocates for higher retail wages and his own economic development agenda. The D.C. Council failed to override his veto of a “living wage” bill, which would have raised the minimum wage for employees of certain big-box retailers. The measure attracted significant national attention and prompted Wal-Mart to threaten nixing plans for several stores backed by Gray.

About the same time, Gray stood in front of national cameras after gunman Aaron Alexis rampaged through a Navy Yard office building, putting the mayor on a prominent stage with law enforcement officials, including his popular police chief, Cathy L. Lanier.

“How this could happen is beyond belief,” Gray said during one interview on CNN — in which he suggested that federal budget cuts may have been to blame for lax security at the Navy Yard. “It really is hard to believe that someone with a record as checkered as this man could conceivably get clearance.”

The shutdown has provided even more publicity, none more dramatic than Gray’s impromptu confrontation with Senate Majority Leader Harry M. Reid on the Capitol steps.

“Sir, we are not a department of the government,” the mayor told Reid. “We’re simply trying to be able to spend our own money.” That and Reid’s retort — “I’m on your side. Don’t screw it up, okay?” — were reported widely.

Gray might be the only winner so far in the federal shutdown. His indignation about the city’s subservient relationship to Congress is nothing new; many times, he has slammed his fist into lecterns while pressing for District autonomy. He was even arrested in civil disobedience in 2011. But recent events have given him a wider audience.

Gray sought to keep the momentum going Thursday, drawing hundreds to a Southeast gymnasium on a rain-soaked school night for a speech billed as an update on the shutdown.

His speech took on the cadence of a campaign rally, and after a dozen interruptions for applause, the mayor was clearly feeding off the energy and animosity the shutdown had unleashed.

“Statehood,” one audience member screamed out.

“I hear ya,” Gray yelled back.

Facing a bank of reporters after the speech, Gray was less adroit about his political future — a subject he has continued to dismiss with glib remarks.

“There’s nothing new I have to tell you,” Gray said. “We’re doing our job with vigor, great vigor.”

Gray’s staunchest supporters believe he could run again and win.

Aviva Kempner, a filmmaker living in Forest Hills, said she has been energized by Gray’s aggressive moves during the shutdown — particularly his encounter with his fellow Democrat Reid. “We have a mayor who continues to fight for us. This is the reason I worked on his campaign. This is the reason I believe he should run again.”

Worrisome for Gray is that significant elements of his 2010 coalition have fallen away, leaving him without a ready campaign infrastructure.

Chuck Burger, who served as Gray’s Ward 6 coordinator, is now supporting Wells. “Everybody kind of ran away” after the scandal broke, Burger said.

Rick Lee, whose family owns a flower shop on U Street NW, backed Gray in 2010 but is behind Bowser in the upcoming race. No amount of speeches or chants or congressional confrontations, he said, is likely to change his mind. “That’s a bunch of jive, man, come on,” he said. “Grandstanding.”

Gray’s shutdown stance and the other positive coverage have likely helped him, said Burger, a Capitol Hill real estate agent. But he questioned whether it would be enough to reverse the damage done by campaign scandals, especially considering Gray’s silence on them.

“Those are some deeply rooted feelings people had,” he said. “Anything positive does benefit him. But there are some serious questions that need to be addressed.”

The Rev. Graylan Hagler, a leader of the effort for the wage bill that Gray vetoed, called the mayor “spineless” last month at a news conference, but Thursday, he said Gray’s confrontation with Reid was “the right thing.”

If he runs for reelection, Hagler said, Gray may yet win his vote. “He hasn’t gotten it, and he hasn’t lost it.”