Karl D. Loos, 87, a lawyer here for more than 50 years who specialized in cooperative law and the marketing of agricultural products, died at the Wisconsin Avenue Nursing Home Tuesday. He had suffered from a heart ailment.

Mr. Loos was born in Iowa City, Iowa. He earned undergraduate and law degrees at the University of Iowa and was a member of Phi Beta Kappa and the Order of the Coif. He practiced law in Chicago from 1914 until 1921, when he moved to Washington.

He became a specialist in agricultural and cooperative law and helped develop the concept of agricultural marketing orders.These orders were designed to stabilize the price farmers received for their produce.

From 1953 to 1954, Mr. Loos served as solicitor of the Department of Agriculture in the first Eisenhower administration. He then returned to the law firm, Pope Ballard & Loos, of which he was senior partner. He had been in Semiretirement since 1973.

Mr. Loos was a member of the Washington Rotary Club, Columbia Country Club, Burning Tree Club, Army-Navy Club in Washington, and the Metropolitan Club.

Survivors include two sons, Howard H. and Dickson R., both of Chevy Chase, eight grandchildren and one great-grandchild.