Former D.C. mayor Vincent C. Gray announced that he intends to seek Ward 7 council seat in the June 14 Democratic primary. Here are some of the highlights from his long political career in D.C. (Ashleigh Joplin/The Washington Post)

Former D.C. mayor Vincent C. Gray (D) will return to politics in the nation’s capital with a run for the Ward 7 council seat, two months after federal prosecutors ended an investigation into Gray’s 2010 campaign.

Gray, who lost the 2014 Democratic mayoral primary to Muriel E. Bowser, formally announced his decision Thursday during an appearance on the Kojo Nnamdi Show on WAMU-FM (88.5).

He said the move to run in his home ward was motivated in part by area residents’ “wide dissatisfaction” with incumbent council member Yvette M. Alexander (D), whom Gray once endorsed.

“The general sentiment at this stage is that there hasn’t been the level of responsiveness that people expect,” he said after the radio show.

A spokeswoman for Alexander said that the council member was in an all-day oversight hearing but that she was “aware” of Gray’s decision and was unlikely to respond to his comments.

“She knows that her supporters know the work that she’s done, they know her track record,” spokeswoman Tiffany Browne said.

If Gray wins the primary in overwhelmingly Democratic Washington, the 73-year-old would probably become the second D.C. mayor to return to power after a run-in with federal prosecutors.

Marion Barry (D) won a council seat and then a return to the mayor’s office in the 1990s after serving a jail term for cocaine possession.

Gray was never charged in the investigation of financial irregularities in his 2010 mayoral campaign. But he blames the nearly five-year probe — which resulted in six associates pleading guilty to crimes related to illegal financing of the campaign — for his loss to Bowser.

One of Gray’s former associates, Jeffrey Thompson, who admitted to illegally financing Gray’s 2010 campaign — and has also implicated Gray — is scheduled to be sentenced in federal court four days before the Democratic primary on June 14.

But Gray said Thursday that he doesn’t expect “a repeat of what happened in March 2014,” when federal prosecutors alleged in court weeks before the primary election that Gray had knowledge of the illegal campaign fund. Comments by then-U.S. Attorney Ronald C. Machen Jr. at a news conference were widely interpreted to mean that Gray might soon be charged. And Gray’s supporters now feel angry about how the former mayor was treated.

Gray’s return to the council could create a headache for Bowser as she enters her third year in office, adding a fresh voice of contention to a legislative panel where she needs a majority of support to advance her legislative agenda.

Alexander has allied herself closely with Bowser over the past year and is expected to have the mayor’s support on the campaign trail.

Gray said Thursday that his move in “no way” constituted a form of “retribution” against the person who defeated his bid for a second mayoral term.

“There’s too much work to be done in this city. There’s too much effort to be made,” he said.

But he also used his radio appearance Thursday as a pulpit to criticize Bowser for her handling of the Skyland Town Center development in Ward 7, which recently lost its planned anchor store, Walmart.

“It was a dastardly act,” Gray said of Walmart’s pullout. But Bowser could have done more to maintain “relationships” with developers and investors, he said. “I think as mayor you got to be on top of these things.”

The mayor, through her chief of staff, declined to comment on Gray’s decision. “We are focused on the upcoming budget and running the government,” said John Falcicchio, Bowser’s chief of staff.

Gray said he had spent weeks weighing whether he wanted to run, and which office he would ­contest.

A recent poll commissioned by Gray’s supporters helped him along by suggesting that the former mayor would have a better shot at winning the Ward 7 race than the at-large contest. Poll results gave Gray a double-digit lead over Alexander.

Some Ward 7 residents had also questioned Gray’s motivation for running, even before he announced he would seek the seat. “Maybe he’s trying to get back all the people who had something against him,” Derrick Broadus, a post office worker and Ward 7 resident, said last week.

But Gray cast his bid for office as “an opportunity to be able to do things for people.” And Chuck Thies, Gray’s former campaign manager and current campaign treasurer, said Gray had decided to run in Ward 7 seat because it represents “the path of least resistance” and because “it’s home.”

Carrie L.Thornhill, a high school classmate and longtime friend of Gray’s, will chair his campaign. Gray said he will name a campaign manager soon.

In November, a Washington Post poll found 58 percent of residents in Ward 7 approved of how Gray handled the mayor’s job while 36 percent disapproved, significantly higher than his overall 39 percent job approval mark almost 10 months after leaving office.

But the former mayor will be competing in a political environment that has shifted since his time in office. Several of Gray’s former allies have already thrown their support behind other candidates, and one former campaign worker, Ed Potillo, will be running against him.