Pete Hegseth faces growing pressure over the Iran war following Republicans’ midterm election losses, even as Donald Trump continues to support his defense secretary. With voters and the president identifying the conflict as a key factor in the defeat, criticism of Hegseth is coming from within his own party as well as from Democrats.

On Wednesday, JD Vance questioned publicly whether the war had been worthwhile and said it had cost Republicans control of Congress. A former senior Pentagon official told CNN that the military campaign had largely been led by the defense department because the administration had chosen military action to address a foreign policy issue. A Republican close to the White House separately told CNN that Hegseth should be held responsible, accusing him of being dishonest or mistaken about the conflict’s timing, goals and objectives.

Trump rejected the suggestion that he was considering a replacement when reporters asked him on Wednesday. He said Hegseth was doing “a very good job”. Pentagon press secretary Kingsley Wilson also defended the secretary in a statement to USA Today that day, saying the department was united behind his vision and would continue to prioritize American service members and the country.

The president has previously portrayed Hegseth as an early advocate of the conflict. On 23 March, Trump recalled the secretary being the first to speak in favor of military action, citing the need to prevent Iran from obtaining a nuclear weapon.

Hegseth also faces an impeachment effort from Thomas Massie, the Republican congressman from Kentucky. Massie has filed eight impeachment accusations against him and intends to force a House vote soon. The move adds to the pressure on a secretary whose relationships with members of his own party have become strained.

Republican senator Thom Tillis told CBS News on Tuesday night that Hegseth faced “a reckoning”. As election results arrived, Tillis said those difficult relationships were hurting the administration’s effort to secure a $1.5tn defense spending package. He questioned whether Hegseth was the best person to bring those requests to lawmakers before the current Congress ended in 60 days.

Democrats, meanwhile, have pledged investigations into Hegseth’s leadership of the Pentagon. Aides say potential inquiries could cover the Iran war and his removal of senior military officers, including the chair of the joint chiefs of staff. His Ukraine policy and American strikes against alleged drug-trafficking boats in Latin American waters could also come under scrutiny. Some Democrats say those strikes could constitute war crimes.

Adam Smith, the Democratic representative expected to chair the House armed services committee next year, has promised vigorous oversight. He said that scrutiny would encompass both the Iran conflict and what he described as the erosion of the military’s “apolitical foundation”.