OTTAWA (AP) _ Allied-Lyons PLC cleared a major hurdle in its bid to acquire the Hiram Walker liquor group Friday when the Canadian government approved the deal.

But the sale remains in doubt because the new owners of the liquor group's parent company, Hiram Walker Resources Ltd. of Toronto, are in court trying to block the sale to Allied-Lyons, a diversified British concern.

Canadian Industry Minister Michel Cote, in approving the sale, acknowledged the court fight and said his action was based on his assessment of the sale's benefits to Canada and was independent of the litigation.

He said Allied-Lyons agreed to maintain the group's current level of employment and to keep the liquor operation as a separate entity with a high degree of autonomy.

''This corporate structure will give Hiram Walker the ability to retain and reinvest the funds it generates,'' Cote said.

Hiram Walker agreed in April to sell its liquor group to Allied-Lyons for about $2 billion as part of Hiram Walker's bid to thwart a takeover bid by Gulf Canada Corp.

The liquor group makes such products as Canadian Club whisky, Ballantine's scotch, Couvoisier cognac and Kahlua liqueur.

But before the sale could occur, Gulf Canada succeeded in buying control of Hiram Walker. Gulf Canada, an energy concern controlled by the Reichmann family of Toronto through its Olympia & York Developments Ltd. unit, then replaced Hiram Walker's board and on May 22 announced it had withdrawn from the proposed transaction with Allied-Lyons.

Gulf Canada has asserted, among other things, that Hiram Walker was permitted within its agreement with Allied-Lyons to withdraw from the sale.

Allied-Lyons, however, contends it has a binding contract to buy the liquor group and has filed suit in the Ontario Supreme Court seeking to force Hiram Walker to complete the deal. The case is being heard in Toronto by Associate Chief Justice Frank Callaghan.

In its suit, Allied-Lyons also asked for the equivalent of at least $725 million in punitive damages to compensate it for the sale's delay. And in the event the court does not order Hiram Walker to complete the deal, the British company's suit seeks about $3.6 billion in damages.