East Bay Rep. Barbara Lee said Thursday that she is considering running for a Democratic leadership position in the House after its current occupant was defeated in a primary challenge this week.

If Lee won the party’s fourth-highest position, chair of the House Democratic Caucus, she would be the first African American woman to serve in the leadership of either party. The caucus chair’s job is to communicate the party’s message to members.

“It’s time,” Lee, D-Oakland, told The Chronicle on Thursday. “African American women have been the smartest and most loyal voters for the Democratic Party, and often we don’t get the recognition or the involvement at the highest levels.

“We have ideas, and we know how to win elections,” Lee said. “You’ve got to have diversity at the table.”

Lee, 72, was first elected to the House in 1998 after serving in the Legislature from 1990 to ’96. She is best known nationally for being the only member of Congress to vote against authorizing the use of force after the terrorist attacks of Sept. 11, 2001. She explained in a Chronicle opinion article that it was “a blank check to the president to attack anyone involved in the Sept. 11 events — anywhere, in any country, without regard to our nation’s long-term foreign policy, economic and national security interests, and without time limit.”

Lee has also long been a leader in obtaining funding for HIV/AIDS programs and is past chair of the Congressional Black Caucus.

She said she began thinking about running for the leadership job after New York Democratic Rep. Joe Crowley, the current caucus chair, lost in Tuesday’s primary to Alexandria Ocasio-Cortez, a 28-year-old first-time candidate who calls herself a democratic socialist. Lee has spent the past two days reaching out to colleagues, including Minority Leader Nancy Pelosi, D-San Francisco, to gauge if she has enough support to win. House Democrats won’t elect new leaders until after the Nov. 6 midterm elections.

“It seems like it’s too early, but I can’t wait too long,” Lee said. “I’m letting people know that I’m interested and why I would want their support.”

Some Republicans say they would relish having her in the national spotlight, to highlight views that they believe will be too liberal for swing voters.

Jack Pandol, a spokesman for the National Republican Congressional Campaign Committee, tweeted Thursday: “Lee as Chairwoman might surpass @NancyPelosi or @KeithEllison as the most gaffe-prone member of Dem leadership — and that’s a high bar.”

Republicans would be likely to zero in on Lee’s longtime efforts to normalize U.S. relations with Cuba. She has visited Cuba more than two dozen times and called for mourning the death of Cuban leader Fidel Castro in 2016. They could also criticize her for asking for clemency two decades ago for Stanley Tookie Williams, founder of the Crips street gang, who was convicted of murdering four people and was executed in 2005.

Although some Democrats have come around to her position on the Sept. 11 use-of-force resolution, saying presidents have since used it to justify military action against targets having little to do with the attacks, Republicans would be likely to use that vote against her and the party as well.

“I am who I am. I don’t hide behind my record,” Lee said.

She noted that her father served in the military for 25 years and said, “I’m as patriotic as they are. But I’ve learned that they’re going to say what they’re going to say. It’s not the first time I’ve been demonized. But I’m going to keep working for the people.”

Joe Garofoli is The San Francisco Chronicle’s senior political writer. Email: jgarofoli@sfchronicle.com Twitter: @joegarofoli