RICHMOND, Va. — In Virginia, where the Confederacy once had its capital and where political power has historically eluded black people, African Americans have just won unprecedented levels of clout.

Black officials there give ironic credit for the change to President Donald Trump and the voter animosity he's engendered.

"We love Trump, he's our best ally," joked state Sen. Lionell Spruill. "The more that crazy white man talks, the better it is for us."

Since Trump took office, Virginia Democrats have won three straight election cycles and are set to control the legislature next year for the first time in more than two decades. The Democratic gains have been powered in large part by black voters.

At least nine new Democrats were elected to the Virginia House on Tuesday, and four of them are black.

Black lawmakers there say they plan use their newfound influence to make sweeping changes to many state laws and policies, including those related to housing, education and criminal justice.

African Americans have been historically underrepresented at a Capitol that's produced a long list of racist laws dating back more than a century. They include the anti-school segregation movement known as Massive Resistance and a ban on interracial marriage drafted by a Nazi sympathizer.

No African Americans have been part of the Republican majorities that have governed the legislature in recent years. And long-serving African American Sen. Louise Lucas said she's often had to fight with fellow Democrats to make sure black lawmakers' priorities aren't "afterthoughts."

"Now we will be taken seriously as opposed to many times in the past when we were not," Lucas said.

Two black lawmakers are vying to become the first African-American House speaker in the state's history and several more are preparing for potential statewide runs in 2021.

Del. Lashrecse Aird, 33, said she's running for speaker because black women — often seen as "the dependable electorate" for Democrats in high office — should also have a role in leadership.

"It's a brand new day," she said.

Legislative committees in Virginia hold huge sway in deciding the fate of bills. No African American lawmaker has led a committee in years. In the House, there hasn't been a black committee chairman since the late 1990s.

Del. Lamont Bagby, chairman of the Virginia Legislative Black Caucus, said he's hopeful that as many as half a dozen black lawmakers will lead committees next year.

"That is a real opportunity for us to have influence," Bagby said.

Changes to state law and policy could include decriminalizing marijuana, making eviction laws friendlier to tenants and boosting spending for the state's black colleges and universities, Bagby and other black lawmakers said.

The black caucus will likely find a willing ally in the Democratic governor.

In February, Gov. Ralph Northam faced intense pressure to resign after a racist picture surfaced from his 1984 medical school yearbook page. He denied being in the picture but admitted to wearing blackface as a young man while portraying Michael Jackson at a dance party in the 1980s.

Shortly afterward, two women accused Lt. Gov. Justin Fairfax of sexual abuse, which he denies. And just days after Attorney General Mark Herring called for Northam to resign, he admitted to wearing blackface in college.

The black caucus took the lead in formulating Democrats' response to the wave of scandals enveloping their top three statewide officials. That included calling on Northam and Fairfax to resign, but opposing a legislative hearing on Fairfax's alleged misconduct.

Lucas, who was among the more outspoken lawmakers in calling for the governor to step down, said she's since changed her mind and is glad he's still in office.

She said the scandal has made a "changed man" of Northam, who has made addressing the state's longtime racial inequalities his top priority of the rest of his term. At a cabinet meeting Wednesday that was open to reporters, much of the discussion focused on issues important to black lawmakers, like making it easier to vote, increasing minority-owned business participation in state government and lowering the African American maternal mortality rate.

"He's working like a true champion to get things done," Lucas said.