Democratic presidential primary candidate Joe Biden urged President Trump to heed advice from his national security advisers and team of military officials when responding to escalating tensions with Iran after earlier comments Tuesday, where he called the president "dangerously incompetent" and on the verge of leading the U.S. into another war in the Middle East.

Following Iranian missile attacks targeting U.S. military and coalition forces at two bases in Iraq early Wednesday, Biden, who was speaking a campaign fundraiser in Philadelphia, said: “I just pray to God as [Trump] goes through what’s happening, as we speak, that he’s listening to his military commanders for the first time because so far that has not been the case."

2020 DEMS OFFER PRAYERS TO US TROOPS FOLLOWING IRAN MISSILE ATTACKS, CALL FOR DE-ESCALATION

At an earlier campaign event in New York, Biden lambasted the president's “haphazard” decision to launch a drone attack at Baghdad International Airport early Friday that killed Iranian Gen. Qassem Soleimani and six others, which triggered threats and ambushes against U.S. military posts in Iraq thereafter by Iran in retaliation.

Biden accused Trump of inadequately consulting Congress or U.S. allies in the region before carrying out the attack and blamed the president for his constant “tweets, threats and tantrums,” calling him “dangerously incompetent and incapable of world leadership.”

“Democracy runs on accountability,” Biden said, urging Trump to consult with Congress on acts of war, as required by the Constitution. “No one wants war. But it’s going to take hard work to make sure we don’t end up there accidentally.”

In the days following the U.S.-led attack on Soleimani, Biden sought to stand out among his 2020 contenders with his decades' worth of foreign policy experience.

But less than a month away from the crucial Iowa caucus, Biden's track record has come under scrutiny of its own, as his progressive opponents with noninterventionist approaches criticize his vote to approve invading Iraq in 2002 even as he now stresses the importance of exerting caution when brokering peace in the Middle East.

During his tenure as vice president to then-President Barack Obama, Biden butted heads with the president, in his disapproval of the decision to pursue a raid in Pakistan that ultimately resulted in the killing of Usama bin Laden in 2011 -- an example that Republicans and Trump have singled out as evidence that Biden is weak when it comes to utilizing military force.

Still, the 77-year-old candidate has repeatedly touted his relationships with "every single world leader," and has focused his proposed foreign policy agenda on fostering diplomacy with other nations.

CLICK HERE FOR THE FOX NEWS APP

Biden called the crisis in Iran “totally of Donald Trump’s making,” and said that Soleimani's death was a result of Trump's decision to withdraw from a multilateral deal in which Iran had agreed to curtail its nuclear program that Biden says “was working, serving America’s interests and the region’s interests."

The Associated Press contributed to this report.