Democratic presidential hopeful Joe Biden on Thursday blasted US President Donald Trump's foreign policy as erratic and extreme. The former vice president said Mr Trump had damaged America's "reputation and our place in the world and, I quite frankly believe, our ability to lead the world". Mr Trump has unsettled Washington's allies by withdrawing the US from the Paris Climate Accord, the nuclear deal with Iran and a trans-Pacific trade agreement. He has also threatened to leave Nato. For Mr Biden, 76, who served in the US Senate for 35 years, it was a much-needed return to firmer ground after weeks of having to defend his civil rights record following debates against other Democratic nominations for presidential candidacy. Kamala Harris, a black senator from California, attacked him in last month's debate over his past opposition to forced busing to integrate schools and his remarks while in the Senate more than 40 years ago about being willing to work with segregationists. Mr Biden apologised for those remarks but he has lost some support from Democratic voters. Ms Harris benefited from her attack and the field among those vying to win the party's nomination to run against Mr Trump has tightened. In an address at the Graduate Centre at the City University of New York, Mr Biden criticised Mr Trump for giving up the country's leadership role in the world. He said that collective action was necessary to confront threats posed by climate change, nuclear proliferation, terrorism and cyber warfare. Mr Biden said that as president he would pull most US troops out of Afghanistan, end US support in the Yemen war and reaffirm the nation's commitment to Nato. He said he would end Mr Trump's travel ban against people from Muslim-majority countries and put a stop to the separation of migrant families at the border with Mexico. Mr Biden has sharply criticised Trump for walking away from the 2015 international nuclear deal with Iran, which he said he would re-sign as president if Tehran returned to compliance. He would recommit the US to the Paris Climate Accord and convene a global summit on climate change. Mr Biden would push for stronger commitments from North Korea to abandon its nuclear programme. Mr Trump strongly criticised the Obama administration’s foreign policy record. He said that the Iran deal was too lenient and that Mr Obama and Mr Biden did not do enough to limit China's economic aggression. Before his speech, the Republican National Committee and a pro-Trump Super PAC released long critiques of Mr Biden's judgment on foreign affairs. They said that he advised Mr Obama to not go ahead with the 2012 raid that killed Osama bin Laden. Mr Biden's record has not yet been a major issue among his rivals for the Democratic nomination, but his vote to invade Iraq while in the Senate has been denounced by US Senator Bernie Sanders of Vermont and others. At a campaign rally in Pennsylvania in May, Mr Trump defended his "America First" policies, telling supporters that Mr Biden "said he’s running to quote ‘save the world'. Well, he wants to save every country but ours."