ABC News political analyst Matthew Dowd faced heavy criticism after making an allegedly sexist attack against a Republican lawmaker over Twitter on Wednesday.

GOP Rep. Elise Stefanik of New York defended President Trump during Wednesday’s impeachment hearing, which featured witnesses Deputy Assistant Secretary of State George Kent and United States Ambassador to Ukraine William Taylor. Although Stefanik was not the only lawmaker to come to the president's defense, Dowd singled her out for criticism.

"Elise Stefanik is a perfect example why just electing someone because they are a woman or a millennial doesn't necessarily get you the leaders we need," Dowd wrote in the since-deleted tweet.

Screenshot/Twitter/Matthew Dowd

After many users took issue with his comment, Dowd attempted to clarify his tweet while saying he would delete it.

"I think people are misunderstanding my tweet. So I will delete. I am just saying we need more millennials and more women isn’t going to solve the problem of needing more leaders with integrity. Vote integrity no matter what," Dowd said.

I think people are misunderstand my tweet. So I will delete. I am saying just saying we need more millennials or more women isn’t going to solve the problem of needing more leaders with integrity. Vote integrity no matter what. https://t.co/xdUdgQVyaV — Matthew Dowd (@matthewjdowd) November 13, 2019

Dowd followed up with a personal apology to Stefanik.

"Hey @EliseStefanik I just want to apologize for a tweet that is being misinterpreted. I didn't mean to suggest you were elected only because you were a woman or a millennial. I deleted the tweet," Dowd said.

Hey @EliseStefanik I just want to apologize for a tweet that is being misinterpreted. I didn’t mean to suggest you were elected only because you were a woman or a millennial. I deleted the tweet. — Matthew Dowd (@matthewjdowd) November 13, 2019

Dowd and Stefanik have worked together in the past. Before she became a member of Congress, Stefanik assisted Dowd as one of his research assistants in writing a book, Applebee's America. One of Dowd's co-authors, Ron Fournier, credited Stefanik with her help on the book in an article in the Atlantic in 2015. Fournier congratulated Stefanik on becoming the youngest woman ever to be elected to Congress at the time.