Leon Jaworski, 77, the deft and determined Texas lawyer of conservative leanings who took over the Watergate Special Prosecutor's office at a critical time and helped force the resignation of Richard M. Nixon, died yesterday after an apparent heart attack at his ranch.

Fully retired from his Houston firm, one of the nation's largest, Mr. Jaworski reportedly was stricken while in the field cutting wood on the Circle J, his 400-acre property near Wimberley in the Texas hill country southwest of Austin.

The son of an impoverished Polish immigrant father, Mr. Jaworski rose through energy and ability to leadership in the American legal establishment, and went on to argue successfully before the Supreme Court for the release of the White House tapes that helped drive Nixon from office.

As the successor to Archibald Cox, Mr. Jaworski assumed the special prosecutor's post amid the suspicion and uncertainty engendered by the so-called Saturday Night Massacre, which culminated in Cox's dismissal.

Confronting a variety of difficulties and impediments, Mr. Jaworski brought many of Nixon's top aides to trial for Watergate-connected crimes, and he supervised the presentation to a grand jury of evidence regarded as invaluable to the House Judiciary Committee's impeachment investigation.

Mr. Jaworski stepped down as special prosecutor in October 1974, after what he described as 11 months "without precedent" in the nation's history. He returned to Washington in 1977 for a year as special counsel to the House committee investigating alleged Korean influence-buying in Congress.

In addition to writing three books in the years after his historic Watergate assignment, he again practiced law privately in Houston.

Although he was renowned as a legal tactician and strategist who could swiftly digest and skillfully use vast quantities of complex information, he did not set foot in a courtroom after 1974.

"You just don't argue another case after you've argued 'The United States versus Nixon' before the Supreme Court," he said.

Although temperatures had already reached 90 degrees at 8 a.m. on July 8, 1974, about 400 persons had lined up in front of the courthouse that day in hopes of hearing part of the arguments in the landmark conflict between claims of executive privilege and the dictates of law.

Before a packed courtroom, Mr. Jaworski flatly denied that there was any constitutional basis for the president's claims of executive privilege and asserted that the courts were required to act in the face of a presidential threat to "our form of constitutional government."

At issue was who had the right, the courts or the president, to decide whether Nixon had to yield evidence of 64 White House conversations Mr. Jaworski said he needed for the trials of Nixon aides charged in the Watergate cover-up.

At one point Mr. Jaworski rebutted the contention that any claim of presidential privilege had ever been held immune from judicial review.

While the president might be right in his claim of privilege, Mr. Jaworski said, he might be wrong. "And if he is wrong, who is there to tell him so? And if there is no one, then the president of course is free to pursue his course of erroneous interpretations. What then becomes of our constitutional form of government?"

When the drawling, well-tailored Mr. Jaworski appeared on the Supreme Court steps after the hearing, in the emotionally charged atmosphere of those days, it was to wild applause and cries of "Right on, Leon! Way to go."

On July 24, the Supreme Court in an 8-to-0 decision, gave its own endorsement to Mr. Jaworski's position, ruling that Nixon had to turn over tapes of White House conversations needed by the special prosecutor as trial evidence.

Release of the tapes was ordered "forthwith." The recordings included one made on June 23, 1973, regarded in some quarters as the evidentiary equivalent of a "smoking gun."

Fifteen days after the court spoke, amid the turmoil and tumult attending the release of the material, Mr. Nixon resigned.

President Reagan, notified of Mr. Jaworski's death last night said he was "deeply saddened."

Former Sen. Sam Ervin Jr., (D-N.C.) who headed the Senate Watergate committee, called Mr. Jaworski a "great American" whose death leaves the nation "much poorer."

"We've lost a great man," said retired U.S. District Court Judge John J. Sirica, who presided at the Watergate trials.

A former president of the American Bar Association and a man whose clients in private practice included the powerful residents of a wealthy state, Leon Jaworski was born in Waco, Tex., Sept. 19, 1905, the third of four children in a family that one member described as "poor as church mice."

Winner of state-wide debate contests while at Waco High School, Mr. Jaworski, an eager, diligent student, graduated at 15, and attended Baylor University on scholarship, receiving his law degree in 1925 and becoming the youngest person admitted to the Texas bar.

In his first court case, he successfully defended a man charged with running an illegal whiskey still near Waco. In another early case he was appointed to defend a black sharecropper accused of killing a white couple.

Despite crank calls and threats, Mr. Jaworski put up a stubborn defense in a trial he lost, but one which, he later said, helped prepare him for Watergate, in that it "taught me to cross the barrier of doing things that were unpopular . . . to realize that after the ordeal is over, you feel inner satisfaction that you have done your duty."

His stubbornly determined courtroom work helped win him a place in Houston with the firm that eventually became Fulbright and Jaworski. His rise to prominence in the firm and in the conservative Texas establishment was interrupted by Army service during World War II and after, including a period as a war crimes prosecutor.

By Texas standards, particularly in the area of race relations, he was viewed as a progressive.

In 1962, he accepted an appointment by then Attorney General Robert F. Kennedy to prosecute the governor of Mississippi for criminal contempt in blocking the admission of a black man to the state university.

A man of complexity and contrast, he made through the years a record as a strong law-and-order advocate who often assailed some defendants' rights decisions of the Supreme Court. He was particularly outspoken in the late 1960s against campus disorders.

When he arrived here to succeed Cox, the very fact that he was acceptable to the president made him suspect in some quarters. The suspicion was soon dispelled.

One of the most difficult questions he faced was whether to indict Nixon. President Gerald Ford's pardon made the question moot.

Leon Jaworski was a "great warrior," Archibald Cox said last night.

Survivors include his wife Jeannette, two daughters and a son.