Former D.C. mayor Vincent C. Gray talks with Lillian Chatman, 94, left, and Ward 7 ANC Commissioner Robin Marlin at a Friends of Francis A. Gregory Library social at the library in January. (Evelyn Hockstein/For The Washington Post)

Supporters of Vincent C. Gray and Yvette M. Alexander, who are vying for a seat on the D.C. Council, stood across a shopping center driveway from each other chanting, cheering and hurling a few pointed insults. With the Democratic primary just days away, the jabs were getting nastier.

“Time for a change in Ward 7!” a Gray backer yelled. Another, pointing at the Alexander group, added, “She ain’t done nothing for this ward but get paid!”

“Girl, please, he let his friend of 40 years go to jail!” an Alexander supporter replied, raising the very issue that is at the heart of the campaign for the Ward 7 council seat.

Alexander, 54, the incumbent, and Gray, 73, a former mayor who handpicked Alexander to succeed him on the council, soon joined their followers on a recent morning. They were trying to reel in voters during the final run-up to Tuesday’s D.C. Democratic primary. In one of the most intriguing and increasingly rough-and-tumble races in the District, both candidates have placed their political futures on the line.

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)

But for the ward’s voters, it also will be a referendum on Gray’s political past.

This campaign marks his official return to politics after being voted out of office as mayor in 2014 under a cloud of suspicion that accompanied the scandal of a 2010 “shadow campaign” funding effort. An investigation of that shadow campaign led to guilty pleas from six Gray campaign staffers and associates.

Gray, who spent the past year teaching at Howard University, has repeatedly denied any involvement in the illegal funneling of $653,000 into the mayoral campaign. He thinks his political career was derailed by a prosecutor with a vendetta and by a local news media that relentlessly hammered him for the scandal — even though he was not charged with wrongdoing and the investigation was eventually shut down. He holds The Washington Post particularly responsible and has declined multiple interview requests from the paper.

For the former mayor of Washington, the race for a council seat has become as personal as any mission he has undertaken, those close to him say.

The sentiment is shared by many in Ward 7, one of the most-neglected and poorest parts of the District, said Barbara Morgan, a longtime ward resident and political activist.

“We feel that he was treated unfairly,” said Morgan, who is supporting Gray. “And he needs to represent us on the council. We don’t care if they like that downtown or not.”

Councilmember Yvette Alexander chants, "Stop the violence, increase the peace," during an anti-violence march June 4 along Benning Road in Washington. (Evelyn Hockstein/For The Washington Post)

Politicking does not come naturally to Gray. He drives himself to campaign events in his black, two-door BMW, rarely travels with an entourage and has an aversion to glad-handing. He is so low-key — some say shy — that it is not always evident that he is the candidate.

Christopher Murphy, who served as chief of staff in Gray’s mayoral administration and is now a vice president at Georgetown University, says Gray’s decision to run fits with his lifetime of public service to a city that he loves. He thinks Gray is a policy wonk at heart who exemplifies substance over style and wants to help people in his ward deal with the issues that affect them most, particularly a jump in violent crime.

Between Jan. 1 and Tuesday, 24 people were killed in Ward 7, accounting for nearly half the homicides in the city this year. Gray has been regularly showing up at crime scenes to talk with residents and police about the surge in gun deaths.

But if the Ward 7 residents’ concerns are at the forefront of Gray’s campaign, there is an unmistakable subtext to his run for office.

“He feels that a real injustice was done to him, and how could he not feel that way?” said Murphy. “And does he understand that being back on the council and being back in public life helps right an injustice in a very small way? Absolutely, he understands that.”

“Vince-dication” is the way Chuck Thies, Gray’s campaign spokesman, describes the goal. Thies managed Gray’s 2014 reelection effort, which went topsy-turvy just weeks before the primary when then-U.S. Attorney Ronald C. Machen Jr. hinted strongly in a news conference that prosecution of Gray for a suspected role in the scandal was likely. Gray’s supporters say the announcement, which came on a day known in Gray circles as “Machen Monday,” cost him a 20-point lead over Muriel E. Bowser (D) overnight and, eventually, the primary election.

When he kicked off his campaign this year, Gray did not directly address the investigation but told his supporters, “I have moved on, but I will not forget.”

After prosecutors in December ended the five-year investigation into the shadow campaign without charging Gray, Thies tested how Gray might fare in a race against Alexander and also in a citywide race for the at-large council seat held by Vincent Orange. Polling showed Gray winning both races, Thies said. But a race against Orange would have proved more difficult because Gray would have had to win back voters who sided against him in the 2014 mayoral primary.

A longtime resident of predominantly African American Ward 7, Gray has always done well with voters there. Even in the turbulent 2014 mayoral primary against Bowser, he received nearly 60 percent of the Ward 7 vote.

The Gray campaign said its most recent internal polling shows him with a lead over Alexander among likely Democratic voters. Alexander has the backing of Bowser but has been criticized as weak on constituent services and as doing little to bring much economic development to the ward, even as much of the rest of the city flourishes.

Gray, too, has been faulted by some as not doing more for the ward when he was mayor. A deal that Gray brokered to bring in a Walmart store fell apart when Gray left office. Bowser and Alexander blame Gray for the collapse of the deal; he insists that it is they who are responsible.

Alexander said she was surprised that Gray, who essentially deeded the ward seat to her when he became D.C. Council chairman in 2007, has entered the race against her.

“He supported me the last three times I ran and never expressed any disappointment with me. So, yeah, I was shocked,” she said.

Alexander, a native Washingtonian and Howard University graduate, worked in corporate marketing and as an insurance regulator for the District before becoming a full-time legislator. She chairs the council’s Committee on Health and Human Services.

Many D.C. political watchers think Gray targeted Alexander because he sees her as a Bowser surrogate. The council seat would allow Gray to be a counterbalance to Bowser and perhaps provide him a platform for a 2018 challenge to the mayor.

There is little goodwill between Gray and Bowser, who have had a frosty relationship since 2010, when Gray, then council chair, knocked out Bow­ser’s mentor, incumbent Adrian M. Fenty, in the mayoral primary. Tensions intensified two years later when prosecutors announced their investigation into the 2010 campaign and Bowser quickly called on Gray to resign as mayor.

In emails to constituents and in public comments, Alexander has hit the former mayor hard, saying that he wants the seat only to later run against Bowser for mayor and accusing him of deep involvement in the 2010 scandal and allowing his friends and associates to take the fall.

Two witnesses told prosecutors that Gray knew about and asked for the shadow campaign money, according to court records. Recently unsealed documents from the investigation show that Gray’s close friend and campaign chairwoman had concerns about an “off-the-books” effort and wanted to talk with Gray about it.

“People didn’t know about the shadow campaign and all the people who went to jail for it,” Alexander said in an interview last week. “They needed to know the difference between not being charged and being innocent. And there’s a distinct difference.”

Gray has mostly avoided public spats with Alexander, but his surrogates have been more than happy to engage.

Neither Gray nor Alexander gets high marks from voters, said Dorothy Brizill, a longtime political watchdog in the District.

“The real problem is the two front-runners are really flawed candidates,” she said. “I told my husband I wanted to add another candidate to the ballot. He asked who I wanted to add, and I said, ‘None of the above.’ ”

Rudolph Mitchell, 63, is retired and leaning toward Alexander. He said he cannot get past the allegations against the former mayor.

“Even though he didn’t get prosecuted for anything, all his people did,” he said.

Toshiba Dawson, 27, feels differently. “I like people who are real into the community,” she said. “I see him out here with the kids, listening to them. We really need that.”

Freda Beamon, 51, is unemployed and lives in public housing. Like many in the ward, she is not impressed with either candidate. “Ward 7 is a divide between those who have it and those who don’t,” she said. “They’re not getting anything done here for the crime problems and the drug addiction. And the only time we see them is when it’s time to vote.”

Brizill gives the edge to whichever candidate is better organized and better funded to get out the vote and drive home a message during early voting and on Tuesday. By Friday’s contribution reporting deadline, Gray’s campaign says it will have raised more than $165,000. The Alexander campaign declined to say what its Friday total will be. At the March reporting deadline, it had taken in $104,000.

Driving through the ward, the battle of yard signs seems to lean toward Gray, but Alexander has billboards at main intersections touting her endorsement by The Post, a fact that particularly irks members of Gray’s inner circle, who feel that the paper’s editorials and overall coverage have been unfair to Gray.

As the primary election approaches, both sides are revving up their voting machines and making a final push.

“I think it will be a very close race,” Brizill said. “I just hope they don’t kill each other on Election Day.”

Aaron C. Davis and Ann Marimow contributed to this report.