Labor Secretary Raymond J. Donovan has abruptly blocked Hugh L. Reilly, the controversial new solicitor of the National Labor Relations Board, from returning temporarily to his old Labor Department job.

Department spokesman Michael Volpe said Ronald J. St. Cyr, deputy assistant secretary for management and services, "acted beyond his authority" on Tuesday when he asked the NLRB--without consulting Donovan--to "detail" Reilly temporarily to the department.

Donovan's refusal to go along caught the board and Reilly by surprise. A few hours before the secretary intervened the board had issued a news release announcing the transfer and naming an acting solicitor.

Only two weeks ago the Republican-dominated NLRB voted to strip the agency's Democratic general counsel of some of his traditional powers and give them to Reilly, a Republican. The move prompted criticism from labor groups and members of Congress.

St. Cyr told the board he "urgently needed" Reilly because of his expertise on labor aspects of the Urban Mass Transportation Act and the Airline Deregulation Act.

But St. Cyr retracted his request yesterday under orders from Donovan, who Volpe said was "outraged" by the request. According to Volpe, Donovan had blocked the move because he felt the agency already had several attorneys with expertise similar to Reilly's. Volpe said Donovan also thought it might be a "conflict of interest" for Reilly to return to the agency while he was serving as chief attorney to the independent NLRB, which oversees federal collective bargaining laws.

Privately, department sources said Donovan didn't want Reilly to return under any circumstances, because the secretary didn't agree with his views on labor issues.

Reilly has been the target of controversy since he joined the Labor Department in 1981 because he once worked as a lawyer for the National Right to Work Committee, a conservative group that opposes compulsory union membership.

He and St. Cyr both worked for Donald L. Dotson when Dotson was assistant secretary of Labor for labor-management relations. When Dotson became chairman of the NLRB earlier this year, he hired Reilly as the board's attorney, and St. Cyr filled his old job on an acting basis.

Dotson yesterday denied news reports that he had tried to get Reilly transferred to defuse criticism of the board. He said that Reilly had approached him about the transfer. "He said he liked the work there at the Labor Department , better than here," Dotson said. "There was no attempt on our part to get rid of him."

Reilly referred all questions to board spokesman, Iliff McMahan, who simply said Reilly "still is functioning as our solicitor."