A supporter greets D.C. Mayor Vincent Gray at an event Saturday in Southeast where he announced he will seek another term as mayor. In his opening remarks, he apologized for the "pain and embarrassment" he caused as a result of his 2010 campaign. (Michael S. Williamson/The Washington Post)

Public opinion of Mayor Vincent C. Gray has strongly rebounded in the 18 months since scandal threatened to derail his mayoralty, with voters supporting him over all of his Democratic primary challengers, according to a new Washington Post poll.

But doubts about Gray’s trustworthiness persist, according to the survey. With just 24 percent of Democratic voters backing him, the mayor’s opponents still have an opening to unite voters against the him before the April 1 primary.

In addition, the poll shows that Gray is not an inevitable winner after the primary. He holds a statistically insignificant edge over D.C. Council member David A. Catania (I-At Large), who is considering a run in the November general election. The close numbers herald what could be the city’s most competitive general election since the city began electing mayors in 1974.

The poll starkly demonstrates that the campaign-finance scandal that engulfed Gray’s first term is responsible for his weakness among voters. Nearly three in four Democratic voters say the ongoing federal investigation into the mayor’s previous campaign will play at least some role in their choice for mayor.

Other than the questions about Gray’s honesty, the poll reveals no further major impediments to his reelection. Brightening views of the city’s progress have helped the incumbent mount a significant comeback since July 2012, when a Post poll found that less than three in 10 District residents approved of his job performance amid unfolding revelations about a secret, illegal “shadow campaign” mounted on his behalf in 2010. More than half, at that time, believed he should resign.

View Graphic Full poll results for Mayor Gray and the Democratic primary field of candidates.

Today, roughly half of residents overall — and 57 percent of Democratic voters — approve of the job Gray has done as mayor. Although more residents in 2012 felt the city was on the wrong track than the right track, about six in 10 now feel good about the city’s direction.

“I think as mayor, he’s made a difference,” said Elisabeth Blaug, an attorney living in Cleveland Park. “The city’s really enjoying some wonderful developments, and I don’t think that can happen without a strong mayor.”

But Blaug, 54, said she is not convinced that Gray deserves a second term, citing the 2010 campaign scandals and the unfinished federal investigation. She said Gray’s denials of wrongdoing have not been convincing.

“It would be helpful if he could clear some things up,” Blaug said. “When there are so many people around him who are in trouble . . . you kind of scratch your head and think, ‘Really, you didn’t know anything?’ ”

“I’d like to see him succeed,” she added, “but I don’t think a mayor with a cloud over his head is what Washington, D.C., needs right now.”

About one-quarter of the registered Democrats who approve of Gray’s job performance do not support him for reelection. But so far, the electorate has failed to coalesce around any of his challengers.

Three D.C. Council members running against Gray in the primary are in a virtual tie: Muriel Bowser (Ward 4), Jack Evans (Ward 2) and Tommy Wells (Ward 6) each attract between 11 and 12 percent of Democratic voters. A fourth legislator, Vincent B. Orange (At Large), has 9 percent, and businessman Andy Shallal has the backing of 5 percent. Reta Jo Lewis, a former State Department official, and businessman Christian Carter each garner 1 percent.

The candidates See the Democrats who have picked up nominating petitions for the District's April 1 primary and find candidate profiles and video coverage of the race.

Gray’s public approval rating has leaped 22 percentage points among city residents generally since July 2012 — from 29 to 51 percent — and the improvement is broad-based, crossing racial, gender, geographic and income groups. Race remains the chief dividing line in Gray’s support, with 57 percent of African Americans and 59 percent of other non-whites approving, compared with just 37 percent of whites.

Despite the rebound, Gray’s level of support in the primary is underwhelming given the electorate’s positive attitude toward the city he leads. That sentiment is rooted in doubts about his integrity.

While he earns credit for attracting new business to the city (with 68 percent rating him positively), improving city services (53 percent positive) and reducing crime (55 percent positive), only 32 percent of city residents say they believe him to be honest and trustworthy.

That is an improvement from July 2012, when only 22 percent of residents said they found him trustworthy. In a race where more than four in 10 Democratic voters say the ongoing investigation will be a major factor in their vote, it is the primary source of weakness in Gray’s bid for a second term.

Even if he survives the primary, he could face the most difficult general election battle of any Democratic mayoral nominee in a city where Democrats have long enjoyed a massive registration advantage.

Registered voters split 43 to 40 percent between Gray and Catania, who said he is likely to run should Gray prevail in the primary.

Doubts about Gray’s truthfulness, which could inform both primary and general elections, explain the chasm between the mayor’s approval rating among registered Democrats and actual vote support. Those doubts also show in the starkest terms how much the scandal surrounding his 2010 campaign has endangered his prospects for reelection — and how overwhelmingly he might have won without it.

Martha Ward, a retired police officer living in the Woodridge South neighborhood, said “there’s a lot of good things to say about the state of the city” and credited Gray for them — including the opening of a new Costco warehouse not far from her home.

But Ward, 68, said the unfinished investigation is a deal-breaker. “Unless he is totally cleared, I could not see myself voting for him,” she said. “This city has always been a stepchild of the Congress. . . . When there’s all this back-and-forth business and questionable conduct, that’s a serious matter. We have to fight for every little tiny thing.”

Democratic voters who say the probe is only a minor factor or no factor at all prefer Gray by a wide margin.

Marilyn Wilson, a Justice Department retiree living in Michigan Park, said she had no doubts about Gray’s integrity and no qualms about supporting his reelection.

Wilson, 67, said she became acquainted with Gray three decades ago through her ex-husband, a college classmate.

“One thing I know about the mayor personally is he’s very naive,” she said. “He trusted people too much — people from back in the day he thought were honest, and they ended up being not honest at all.”

Despite concerns about the rising cost of housing, Wilson said she’s been impressed with the continuing drop in crime in her neighborhood, the quality and variety of public charter schools and the new businesses coming to the city. None of Gray’s challengers, she said, had convinced her they would do a better job.

Gray’s path to victory looks much the same as it did in 2010, particularly if the field remains splintered. He retains his strongest support east of the Anacostia River, where 34 percent of voters support him — 10 points higher than his support among registered voters overall.

Another group with which Gray does particularly well: Nearly four in 10 voters who cite economic inequality as a major concern favor him for reelection by more than 20 points over his competition — an indication that his “One City” campaign theme continues to strike a chord with voters.

Among the challengers, the starkest variation appears to be geographic, with candidates doing best in their home wards. Bowser and Evans show the most potential to cross racial lines, while Wells leads all candidates among white voters but finishes near the bottom among black voters.

There are indications that Gray’s challengers still have time to connect with voters.

Francoise Brasier, a federal retiree living in Capitol Hill, said she also believes the city is on the right track and has no issue with Gray’s job performance.

But Brasier, 69, said the ethical cloud over Gray weighs on her, and she is exploring alternatives. She said she has been impressed by Wells, who has been her ward council member since 2007.

“I think well of him, but I’m not sure in a D.C.-wide election whether he’d stand a chance,” she said. “I think it depends, at the end, who’s going to be on the slate.”

Peyton M. Craighill contributed to this report.