New York Times reporter M. A. Farber yesterday won a reprieve in the Supreme Court a mere 45 minutes before he was to return to jail for disobeying a subpoena for his full confidential investigative file in a new Jersey murder trial.

Acting in a major constitutional case arising from the tension between the guarantees of a free press and a fair trial, Justice Potter Stewart indefinitely stayed the sentences imposed on Farber and The Times for both civil and criminal contempt.

The stay will be in effect "until further order." It was issued at 3:15 p.m. while Farber was preparing to reenter the Bergen County Jail in Hackensack rather than disclose confidential files to a New Jersey judge presiding at the murder trial of Dr. Mario E. Jascalevich.

Jascalevich is charged with the murder of three patients at an Oradell, N.J., hospital in the mid-1950s. A series of articles Farber wrote in 1975 on the deaths prompted officials to reopen an investigation, which resulted in the indictment of Jascalevich.

Farber was incarcerated for 27 days on a sentence for civil contempt that was to remain in effect either until the end of the Jascalevich trial, now in its seventh month, or until the reporter produced all of his investigative notes, tapes and other materials for private inspection by Superior Court Judge William J. Arnold.

The Times, also on conviction of civil contempt, has paid a daily fine of $5,000, for a total to date of $130,000.

For criminal contempt, Farber drew a six-month sentence to start on completion of his incarcertion for civil contempt: The Times drew a $100,000 fine.

The New Jersey Supreme Court affirmed the convictions, 5 to 2, Thursday. Yesterday morning, attorney Floyd Abrams petitioned U.S. Supreme Court Justice William J. Brennan Jr. to stay the sentences, and the full court to review and reverse the New Jersey high tribunal.

Brennan, the circuit justice for New Jersey, referred the state peition to Stewart, the next most senior member of the court, saying without explanation that he will not participate in the case. Stewart, in a breif order, made no mention of the petition for review and reversal.

The court can continue the stay until it disposes of the petition for review - either by denying or by granting review, hearing oral arguments and finally issuing a decision.

A central issue in the case was the request of Farber and The Times for a hearing to precede the trial judge's proposed in camera inspection of the reporter's files.

Arnold refused to grant such a hearing. Upholding him, the state high court said that no hearing was necessary or required because, on the basis of the record before Arnold, it was "quite inescapable" that a hearing would be superfluous.