Image copyright EPA Image caption Most of the civilian deaths in Yemen have been attributed to air strikes by the Saudi-led coalition

US President Donald Trump has vetoed a bill passed by Congress to end support for the Saudi-led war in Yemen.

Mr Trump described the resolution as an "unnecessary" and "dangerous" attempt to weaken his constitutional powers.

It is only the second time Mr Trump has used his presidential veto since he took office in 2017.

Opposition in Congress to his policy on Yemen grew last year after Saudi agents killed the journalist Jamal Khashoggi at the Saudi consulate in Istanbul.

The resolution passed the House of Representatives in April and the Senate in March, the first time both chambers had supported a War Powers resolution, which limits the president's ability to send troops into action.

"This resolution is an unnecessary, dangerous attempt to weaken my constitutional authorities, endangering the lives of American citizens and brave service members, both today and in the future," Mr Trump said in the veto message.

The House Speaker, Democrat Nancy Pelosi, was among those to condemn President Trump for the move.

Yemen has been devastated by a conflict that escalated in March 2015, when the rebel Houthi movement seized control of much of the west of the country and forced President Abdrabbuh Mansour Hadi to flee abroad.

Alarmed by the rise of a group they believed to be backed militarily by regional Shia power Iran, Saudi Arabia and eight other mostly Sunni Arab states began an air campaign aimed at restoring Mr Hadi's government.

The US has provided billions of dollars of weapons and intelligence to the coalition.

Media playback is unsupported on your device Media caption The war's devastating effects on Yemen's children

The UN says at least 7,000 civilians have been killed in the country, with 65% of the deaths attributed to air strikes by the Saudi-led coalition.

US senators have accused Saudi Crown Prince Mohammed bin Salman of ordering the murder of Mr Khashoggi, but Saudi prosecutors have insisted it was a "rogue operation" and that the agents were not acting on his orders.

President Trump first used his veto last month after Congress voted to block his declaration of a national emergency on the US southern border in order to secure funding for his border wall.