Speaker of the House Nancy Pelosi praised Democratic House candidate Dan McCready because while he did not win the special election in North Carolina on Tuesday, "he won the campaign."

"I'm very proud of Dan MCready. He's a great patriot, he's an independent voice for the district he would have represented," Pelosi said in press conference on Thursday.

The California Democrat said because MCready performed better than past Democratic candidates in previous elections, "he won the campaign. He didn't win the election, he won the campaign."

McCready, 36, ran against Republican Dan Bishop, 55. North Carolina’s 9th District seat was up for grabs after allegations of voter fraud during the 2018 midterms left no clear winner.

Bishop beat McCready, who is a Marine Corps veteran, by getting 50.7% of the vote. McCready received 48.7%.

During the same press conference, Pelosi walked out early after being asked by reporters about impeachment proceedings from the House Judiciary Committee.

"Why is it that you are hung up with a word over here when lives are at stake over there?" Pelosi asked, referring to the gun control bills that are on the Senate side but have yet to be brought to the floor to be voted on.

[Read more: Trump hails special election victory in North Carolina]