D.C. Council member and former mayor Vincent C. Gray (Ward 7) will not challenge Mayor Muriel E. Bowser in the Democratic primary, clearing the way for Bowser to secure her party’s nomination — which in overwhelmingly Democratic D.C. typically presages a general election victory — without any serious opponents.

In a brief interview Thursday, with the filing deadline for the June primary approaching at day’s end, Gray said he had not tried to gather signatures to get on the ballot.

However, he would not rule out the possibility of running against Bowser in the general election — a move that would require him to change his party registration — and said he had been urged to challenge the mayor by District residents unhappy with recent scandals in the public school system.

“I have heard it just repeatedly,” he said.

The decision by Gray, a one-term mayor whom Bowser defeated in 2014 amid a federal investigation into his campaign finance activity, had long been anticipated by watchers of D.C. politics.

Gray was never charged and still commands a loyal following in his base of Southeast Washington. But his reputation remains damaged, and he would likely struggle to build a coalition broad enough to threaten Bowser.

A Washington Post poll in the summer showed that the mayor enjoys a 67 percent approval rating. She has raised more than $2 million toward her reelection campaign.

In recent months, as education-related scandals buffeted Bowser’s administration, speculation grew about a primary challenge from Gray or council member Robert C. White Jr. (D-At Large).

But White has said he would not run because the timing is bad for his young family; his daughter is 18 months old.

Gray had left the possibility open through the end of last week, saying he could collect the 2,000 petition signatures necessary to qualify for the primary ballot within a couple of days if he chose to jump in at the last minute.

The filing deadline for candidates was 5 p.m. Wednesday. It was extended for 24 hours as much of the District and the surrounding region shut down because of a snowstorm.

A $653,000 “shadow campaign” of illegal spending in Gray’s victorious 2010 campaign against Mayor Adrian Fenty led to an FBI investigation and guilty pleas by six people, including associates of Gray. Gray has consistently said he was not aware of the illegal activity.

He blamed federal prosecutors for unfairly tarnishing him and causing his 2014 loss to Bowser.

Gray returned to public office in January 2017, easily winning a seat representing Ward 7 on the council. In that position, he has played an influential role as chairman of its health committee and led newly aggressive oversight of the District’s troubled public hospital, United Medical Center.

Gray said Thursday that he remained focused on similar policy issues, such as funding for a new hospital for Southeast Washington in the mayor’s just-released budget.

“My attention really is on health care at this stage,” he said.