William L. Greene, 71, a retired engineer and the plaintiff in a case in which the U.S. Supreme Court declared the government's industrial security program to be unconstitutional, died Dec. 9 at Bath (Maine) Memorial Hospital after a heart attack.

From 1967 until he retired in 1985, Mr. Greene managed his own engineering consulting firm in Annapolis. Before that, he headed Tecfab, a concrete products company in Beltsville. In the early 1950s, he was a draftsman in an architect's office in Annapolis.

All this occurred after an incident in 1951 that led to his being fired from his $18,000-a-year job as vice president of the Engineering & Research Corp., a defense contractor in Riverdale. He was accused of being a security risk and his dismissal was ordered by the government under the industrial security program then in effect.

Mr. Greene sought a hearing. With the help of a member of Congress he eventually got one. It transpired that the evidence against him was the alleged communist sympathies of his former wife. Mr. Greene testified that not only had he disagreed with his wife on politics, but also that their differences had led to their divorce, which took place in 1947.

The hearing panel ruled against him and he took the matter to the federal courts. In 1959, the Supreme Court struck down the industrial security program. Chief Justice Earl Warren wrote that the hearing at which Mr. Greene's clearance was denied "failed to comport with our traditional idea of fair play."

Mr. Greene then began an action in the U.S. Court of Claims for the money he said he had lost because of the government's action. This, too, went to the Supreme Court and Mr. Greene again prevailed. He eventually settled for $46,000.

A native of New York City, Mr. Greene graduated from New York University. He moved to Washington in 1937 to join the Engineering and Research Corp.

He was a founding member of the Severn Sailing Association and a member of the Sailing Club of the Chesapeake.

His marriage to the former Jean Hinton ended in divorce.

Survivors include his wife, Dorothy S. Greene of Bath; their four children, Dr. Robert Wolfe Greene of Duxbury, Mass., Walter Skinner Greene of Arnold, Md., Diane Blackburn of Berkeley, Calif., and Navy Ensign Michael Spitzer Greene of Norfolk, and three grandchildren.