Two Englishmen, convicted of moonshining in Saudi Arabia, were publicly flogged and sentenced to six-month jail terms for breaking the Moslem ban on alcohol and selling their home brew to the Arabs, the British Foreign Office said yesterday.

Angry British legislators called on the Labor government to pull its ambassador out of the Saudi capital, Riyadh, to protest the flogging, which occurred May 15. A British diplomat in Saudi Arabia said that the two have now been released and will fly to London today.

"This is an appalling and outrageous piece of barbarism," said John Lee, a Labor deputy who introduced a motion in Parliament urging Foreign Secretary David Owen to recall Ambassador John Wilton.

"It's time Saudi Arabia's laws were brought into harmony with those of the civilized world," said Martin Flannery, another Laborite.

The furor was heightened by a Foreign Office report that seven other Britons in Saudi Arabia face the same punishment for making alcohol. The two who were flogged are Nigel Maidment, 27, and Brian Cooper, 35.

Press reports said the two may have gotten as many as 70 strokes of the cane. The Foreign Office said it has protested the sentences and is trying to ensure that the other Britons are not flogged.

A spokesman said he could not confirm the number of strokes but said the men chose flogging and six months in jail over longer prison terms.

They are engineers for Prismo Universal, a British firm enlarging an airport at Ha'il, a caravan crossroads town 250 miles north of Medina. The Foreign Office said they were arrested in December for manufacturing and selling alcohol, and were flogged in the town square of Ha'il May 15.

Prismo's operations manager in Saudi Arabia, Ernest Fenton, said he understood the Saudis came down hard on the two Britons because of allegations they had made alcohol available to Yemeni workers on the airport site.

A British vice consul visited the men three days ago and found them fit despite their ordeal, the spokesman said. "They took the punishment philosophically," he added.

Observers said the British government was not likely to make too much of the flogging since Maidment and Cooper broke Saudi Arabia's strict laws prohibiting alcohol and chose the caning punishment.