Former Mayor Vincent Gray is unhappy with the quality of construction and materials of the Benning Stoddert Community Center. (Sarah L. Voisin/The Washington Post)

If one wanted to locate D.C. Mayor Muriel E. Bowser in recent days, or to know what might be occupying her thoughts, a good place to start was with the city’s former mayor, Vincent C. Gray.

Back from political exile, Gray spent last week as a new D.C. Council member and counterweight to his nemesis, Bowser. He did it by jabbing her in ways that no city politician had dared since Bowser defeated the incumbent Gray in 2014 in the Democratic primary and won the mayor’s office.

Their awkward pas de deux could serve as a hint of what’s to come, as the two jockey for position and Bowser weighs whether she’ll run for reelection in 2018 while Gray considers whether to challenge her in a mayoral rematch.

The night before his first day back in the John A. Wilson Building last week, Gray invited a television reporter along for a tour of a recreation center in his ward that Bowser’s administration recently renovated. For the cameras, Gray pointed out missing lights in a gymnasium, an ­exposed stove in a family entrance way, and a gas meter blocking a handicapped-accessible restroom. “Shoddy, shabby” work, Gray said, giving residents in a poor neighborhood east of the Anacostia River “the short end of the stick.”

One of Bowser’s top parks officials was dispatched to the scene, in time for a televised tongue-lashing by the former mayor. “This should have been stopped long before now, brother,” Gray said.

D.C. Mayor Muriel Bowser signs a bill to make tampering with GPS devices a crime. (Bill O’Leary/The Washington Post)

A day later, it was Gray on the council dais, shining a spotlight on what might be Bowser’s biggest political weakness ahead of her potential reelection effort: a jump in homicides during her first two years in office.

Gray introduced a bill to hire 500 police officers, saying Bowser had let the force dwindle to an “unacceptable” level. Within hours, Bowser’s office announced a news conference to unveil a new patrol strategy. But it was a policy that wasn’t new and had been announced a week earlier by the police department.

At a court hearing marking the end of a 40-year legal battle for the city about how it treats mentally disabled residents, it was again Gray onstage.

After Bowser abruptly added the event to her schedule, a federal judge acknowledged both of them from the bench and noted Gray’s efforts to improve conditions for the city’s most vulnerable.

By Thursday, Bowser’s team was smarting, and her spokesman dismissed a question about whether Gray had spent the week setting the agenda.

“It’s not necessarily following Vince Gray,” said Kevin Harris.

In an email later in the day, Harris added that “the previous election is long gone and she has no political scores to settle, nor the time or interest to engage in a political tit-for-tat. Whenever Councilman Gray is ready to work with the mayor, her door is open.”

Vincent C. Gray is sworn in as a D.C. Council member by Chief Judge Lee F. Satterfield, right, during a swearing-in ceremony in Washington earlier this month. (Michael Robinson Chavez/The Washington Post)

Then he went back to the recreation center and offered a second rebuke of Gray’s grandstanding.

“This was an example of the petty politics residents have already rejected,” Harris wrote. “I’ll leave it up to the councilman’s constituents to determine if calling the media before you have spoken a word to the mayor, who can actually fix the problem, is the most effective way to get anything done.”

One of the last words from Gray on the topic came via one of his Twitter accounts, which maintains the handle @mayorvincegray: Vince is Back — and so is hands-on oversight.”

City activist Dorothy Brizill, who has been equally critical of Bowser and Gray over the years, shook her head Friday, discussing the back-and-forth.

“What did Bette Davis say? Fasten your seat belt? Well, it’s going to be a bumpy ride,” Brizill said. “Gray is pointing out the shortcoming in Bowser’s administration, as well as that of her staff, and she’s not used to it.”

Brizill said she expects the fireworks to only intensify as the time nears for Bowser to announce plans to run for reelection and for Gray to decide whether he will seek a rematch.

“Gray is going to be playing to people who are not supportive of Bowser, and he is going to wrap himself in the mantra of ‘What have you done for the city?’ — especially for the east end of the city — and that is going to resonate with some,” she said.

Sitting in his council office late last week, Gray clearly enjoyed recounting how he said the mayor seemed compelled to respond to his first days back in office. “Maybe I’ll start sending her the agenda so she has advance notice,” he said, breaking into laughter.

“But seriously, my role is to do the best that I can to serve the people of Ward 7,” Gray said. “If the mayor happens to agree with my agenda, all the better — I guess I better just get out there fast with it before she makes it her own.”

The former mayor’s willingness to poke fun at the current mayor brought back into stark relief the animosity that lingers between the two from their bitter Democratic primary battle in 2014.

Bowser was among the first to call for Gray’s resignation when allegations surfaced in 2012 that his associates spent money that was not properly reported to help him defeat Bowser’s mentor, Mayor Adrian M. Fenty.

Bowser announced her own bid for Gray’s seat less than a year later and made the accusations against him the center of her campaign. She said the city needed to elect a new leader to get out from under the “cloud of suspicion” hanging over City Hall. As she rose in polls, Gray fired back, warning that Bowser was too inexperienced for the job. Prosecutors dropped their investigation into Gray after Bowser won, clearing the way for his comeback.

At his swearing-in on Jan. 2, Gray, 74, picked up largely where he left off, with a thinly veiled reference to Bowser, 44, saying it was time to get rid of “bumper-sticker” politics and for city leaders to maturely approach governing decisions.

Gray continued that line of criticism Tuesday, responding to an audit that found Bowser’s administration had spent a record $41 million on cleaning up from a massive snowstorm last January. The auditor found the city failed to negotiate better deals with contractors and broke some federal procurement rules in the process.

Gray told a Washington Post reporter that Bowser “panicked” in the face of the storm and that the city was better prepared for bad weather when he was mayor. Harris, Bowser’s spokesman, reached out to the newspaper after Gray’s quote appeared online and sought to redirect blame to Gray: It was the former mayor, he said, who left Bowser with a fleet of snowplows inadequate to handle the cleanup.

The tit for tat didn’t end there.

The storm, nicknamed Snowzilla, hit on Jan. 22, 2016, more than a year after Bowser took office, Gray’s former campaign treasurer, Chuck Thies, pointed out in a subsequent email to a reporter. He sent a link to a Bowser news release three months before the blizzard, touting her team’s readiness.

“If you’re asking me if this is the beginning of silly season, before an election, my answer is ‘I hope not,’ ” said council Chairman Phil Mendelson. “I know people want the branches of government to work together, rather than digressing into politics.”

But council member Elissa Silverman, whose office is next door to Gray’s, said it’s hard to escape the fact that two factions suddenly coexist in District headquarters.

She stopped by Gray’s office Tuesday, crowded with fruit baskets from lobbyists, and more than a half-dozen people waiting to see the former mayor. Silverman asked a secretary about a lunch date she had requested with Gray. “You’re in the queue,” the secretary responded, without offering a possible date.

“It’s a little bit of the D.C. politics wayback machine every time I walk by — I’ve run into a lot of former Gray administration officials waiting to see the council member,” she said.

Silverman, too, said she wishes for the best. “I hope the back-and-forth between Bowser and Gray will be a competition of ideas around the best public policy for our city and not simply a blood feud,” she said.

William Lightfoot, Bowser’s former campaign chairman, said it’s up to the mayor to find a way to answer Gray’s criticism.

“Look, the mayor’s doing just fine. Good things in the city are happening because of her work,” he said. “But speaking as a former council member, I think what Vince did this past week is appropriate conduct. Council members should prod the local government to improve and bring to public light where conditions can be improved.”

Spencer Hsu contributed to this report.