British arms sales to Saudi Arabia are contributing towards the “world’s worst humanitarian crisis” where an estimated 24 million Yemenis are in desperate need of aid, the court of appeal has heard.

There is “overwhelming evidence” of violations of human rights law by both the Saudi-led coalition and other forces in Yemen, lawyers for the Campaign Against the Arms Trade (CAAT) told the court on Tuesday.

The appeal, against a high court ruling in July 2017 that the government’s granting of export licences for arms sales was “lawful”, came days after news of an airstrike that killed at least seven people, four of them children, at the entrance to a hospital.

Yemen’s four-year civil war is estimated to have killed at least 60,000 people – through fighting and famine – and left the population exposed to cholera. The Saudi-led military coalition said it is fighting to free the country from Houthi rebels and restore the exiled government.

Lawyers for CAAT and other human rights groups told the hearing that the government should reconsider its decision to sell weapons in light of recent evidence from the United Nations and the European parliament.

Martin Chamberlain QC said one recent report described the war as the “world’s worst humanitarian crisis”. He added: “The humanitarian impact of the conflict has been immense. Critical civilian infrastructure including hospitals, medical clinics, schools and sewerage treatment facilities have been destroyed by documented coalition air strikes. A widespread cholera epidemic has consequently broken out and much of the country faces famine.”

A series of investigations have concluded that Saudi Arabia has committed “repeated violations of international humanitarian law, some of them serious”, Chamberlain said.

“These include targeting which is indiscriminate in nature, failing to respect the principle of distinction between civilians and combatants in military attacks, failing to take ‘all feasible precautions’ in attack to avoid death or injury to civilians, and causing disproportionate death or injury to civilians.

“On a significant number of occasions, [Saudi Arabian] air strikes have resulted in mass civilian casualties.”

The government’s decision to continue arms sales in the face of such evidence contravened its own policies. “We say [Liam Fox, the secretary of state for international trade] reached that view without properly engaging with the evidence showing a pattern of breaches of international law, many of them serious,” he said.

“Faced with such consistent and, we would say, overwhelming, evidence of a pattern of violations – some of them serious – rationality requires [Fox] to either accept that such a pattern is demonstrated or form a view about a sufficient number of them to negate the evidence of a pattern.”

Sir James Eadie QC, for the government, said the secretary of state was entitled to form his own view as to the reliability of the reports and factor it into his decision, along with all the other evidence available to him.

“He did not, and was not required to, dismiss these allegations as unreliable or accept them,” Eadie explained. “Rather he took them into account as part of the overall ... analysis.”

CAAT said UK fighter jets and bombs are being used in the conflict in violation of international humanitarian law. It alleges that the UK has sold more than £4.7bn of arms – including aircraft, drones and missiles – to Saudi Arabia since the bombing began in March 2015.

The appeal, before the master of the rolls, Sir Terence Etherton, and two other judges, is due be heard over three days. Part of the hearing will be closed so that secret evidence can be presented by the government.

A number of human rights campaign groups are intervening in the case, including Amnesty International, Human Rights Watch, Rights Watch UK and Oxfam.