Vincent Gray launched his State of the District speech by addressing a campaign-fundraising scandal, telling residents that he has not broken the law. (The Washington Post)

Mayor Vincent C. Gray’s fourth State of the District address was supposed to offer him a big stage to propose new initiatives on education, housing and economic development just three weeks ahead of a closely fought Democratic primary.

But a day after federal prosecutors unveiled new allegations against him, it also became an opportunity for Gray to address the festering controversy in front of a friendly crowd.

“I say this to all of you, clearly and unequivocally: I didn’t break the law,” Gray said in front of several hundred at Kelly Miller Middle School in Northeast Washington. The crowd gave him a standing ovation and chants of “four more years.”

Prosecutors on Monday said Gray was aware of a secret, off-the-books funding scheme financed by businessman Jeffrey E. Thompson, who pleaded guilty in federal court Monday to felony conspiracy charges. Gray has not been charged.

Gray said residents should judge his credibility versus Thompson’s.

“Who do you believe?” he asked. “A greedy man attempting to save himself? Or me, a public servant who has dedicated his entire career to giving back to our communities?”

The comments on Thompson came near the beginning of a 65-minute address that touched on the city’s advances in education, economic development and unemployment before rolling out several new Gray administration initiatives that will be included in the mayor’s 2015 budget proposal due next month.

They included a commitment of $116 million in new education funding, much of it to create a system that would give additional resources to “at risk” schools, allowing those schools to extend their school day and introduce new programs.

The initiative implements a key recommendation of a recent study of the city’s education system and endorses a pet priority of D.C. Council member David A. Catania (I-At Large), who is running for mayor and could face Gray in the November general election.

Gray also said he would maintain a $100 million commitment to affordable housing — the highlight of last State of the District address — using some of those funds to implement a council law that would exempt senior citizens who are longtime homeowners from having to pay property taxes.

Other initiatives unveiled in the speech included a parental leave program for city employees, offering parents up to six weeks of paid leave after childbirth, and a new Web portal for business owners, unifying the license and permit processes for eight agencies.

The speech had been hastily rescheduled a week ago amid a late-winter storm — and days before news leaked that Thompson was nearing a plea deal to admit to secretly spending more than $660,000 to help elect Gray.

In the hours before Tuesday’s address, mayoral aides said Gray had redrafted portions of his speech to address developments in the case, which have reshaped the April 1 primary into a referendum on his credibility. Three of the mayor’s challengers were preparing live rebuttals across the city.

One candidate, D.C. Council member Muriel Bowser (D-Ward 4), said on public-access television that the allegations against Gray were “tragic” and represented the “worst of kind of corruption.”

“We believe that our mayor must break new ground and command moral authority,” Bowser said, according to prepared remarks. “He, or she, must have character, integrity, vision and the management and leadership skills to get the job done.”

Two groups advocating for the homeless promised to protest the mayor’s speech, and dozens of police officers patrolled a perimeter for blocks around. Police easily outnumbered protesters, who carried a wooden casket with dead flowers to the front of the school in a mock funeral for Gray’s homeless policies.

“We’ve been generally disappointed with how the mayor has approached the homeless crisis, both in his analysis of why it’s happening and how he’s trying to fix it,” said Janelle Treibitz, a campaign organizer with the Fair Budget Coalition.

In the address, Gray unveiled new plans for housing homeless families, who have overwhelmed the city’s safety net this winter. He said the city would partner with nonprofit groups to locate 500 apartments in 100 days to house families, while calling on the city’s faith congregations to help one homeless family each and “help them succeed in getting on their feet.”

Past the protesters walked scores of Gray’s senior staff members, many in pressed suits and dresses. Gray arrived through a back entrance, and inside the audience of mostly city employees, longtime supporters and neighbors greeted the mayor with a prolonged standing ovation.

Gray did not hush the crowd. He sauntered from one side of the stage to the other, stooping to shake hands as the crowd broke into a chant of “four more years.” As he made his way back to the podium, Gray chuckled and said, “I accept.”