For the second time in less than a year, National Hockey League President John Ziegler has ruled against the Washington Capitals in a controversial personnel matter.

Ziegler yesterday awarded the Edmonton Oilers the rights to Swedish winger Bengt-Ake Gustafsson, who was drafted by the Capitals a year ago. Edmonton then made Gustafsson one of its four protected players, retaining him by paying the Capitals $125,000.

Under the specific written terms of the merger agreement, none of the four World Hockey Association teams entering the NHL was permitted to add players after Jan. 1, 1979. Gustafsson apparently did not sign a formal contract until May.

However, as he did in invalidating the Pierre Bouchard-Rod Schutt deal between Washington and Montreal, Ziegler overlooked the specifics and embraced the spirit of the law, instead.

Ziegler was unreachable yesterday, as he rode Chicago owner Bill Wirtz's yacht from the Bahamas to Florida, but NHL Executive Director Brian O'Neill explained the decision by phone from Montreal.

"The signing of Gustafsson was not in violation of the spirit of the agreement," O'Neill said. "The Oilers had talked to Gustafsson in December and offered him a contract in January, with terms similar to what were accepted.

"As far as intent and procedures, what was done with respect to Gustafsson was in line with the agreement. There was good-faith bargaining, with no subterfuge. All rules are subject to interpretation and somebody has to be the arbitrator. John made the ruling within the spirit of those rules."

Peter O'Malley, the Capital's legal expert who drafted the agreement, was distressed by the ruling, by the lack of a hearing and by Ziegler's failure to call him to explain the decision.

"There is no question that the agreement spells out in clear and unambiguous language that the new teams could not sign players like Gustafsson after Jan. 1," O'Malley said. "Under ordinary conditions, that would have voided it.

"But I see a pattern developing here. In the Bouchard case, John was showing the league that he was capable of making a ruling that would hurt Montreal. Now he is helping an incoming team and showing everyone that he is the impartial president of the whole league."

Besides winning Ziegler's blessing, the Oilers had to complete some additional maneuvers before they were able to keep Gustafsson. To make him a protected player, along with Wayne Gretzky and two goalies, the Oilers had to leave their second and third high scorers behind Gretzky, Ron Chipperfield and Blair MacDonald, available to claim.

Since Philadelphia ignored Chipperfield and Los Angeles passed on MacDonald, it can be assumed those teams will be receiving some valuable future draft choices from the Oilers. A similar agreement obviously enabled Hartford to leave its fine defenseman, Gordie Roberts, open without fear of claim by Montreal, which needs defensemen badly.

The Capitals reclaimed defenseman Paul MacKinnon from Winnipeg. They chose MacKinnon in the second round of the 1978 amateur draft then selected Gustafsson on the fourth round.

Gustafsson, who stayed in Sweden this year to complete his military obligation, joined Edmonton for one game during the final playoffs against Winnipeg. The Jets' general manager, John Ferguson, protested that Gustafsson did not have a valid WHA contract and he was ruled ineligible for the rest of the series.