James W. Wine, 71, a retired Washington lawyer and former ambassador who served as John F. Kennedy's special assistant for religious issues in his 1960 campaign for the presidency, died of heart ailments Aug. 23 at his home in Linden, Va.

Mr. Hines joined the Kennedy campaign at the end of August 1960, with the title of special assistant for community relations. A Presbyterian elder and a former associate general secretary of the National Council of Churches, his job was to defuse charges that Kennedy, a Roman Catholic, would be required by his faith to follow church teaching in making public policy.

One of the highlights of the campaign was Kennedy's speech to a gathering of Protestant ministers in Houston in which he said that there was no conflict between his duty to his church and his duty to the country, and that if one arose during his presidency he would resign from office.

Mr. Wine helped draft the speech, which was extremely effective. He also directed other efforts to answer anti-Catholic prejudice. Kennedy became the first Catholic elected to the White House.

After the campaign, Mr. Wine served as ambassador to Luxembourg in 1961 and 1962 and as ambassador to the Ivory Coast from 1962 to 1965. For the three years after that, he was special assistant to Secretary of State Dean Rusk for refugee affairs.

In 1968, he resigned from the government to work in the presidential campaign of Robert F. Kennedy. After Kennedy's assassination, he established a law practice in Washington, specializing in international trade and banking questions.

In 1984, after a heart attack, Mr. Wine went into semiretirement, and he moved his principal residence from Washington to Linden.

Mr. Wine was born in Huntington, W.Va. He graduated from the University of Kentucky in 1940 and received a law degree there in 1942. During World War II, he served in the Army in Europe. His military honors included a Bronze Star.

After the war, he practiced law in Pikeville, Ky., and was a county judge and U.S. commissioner in Kentucky. In 1958 and 1959, he was vice president of Park College in Parkville, Mo. He then joined the National Council of Churches, which is headquartered in New York City.

Mr. Wine was a member of the Presbyterian Church of the Pilgrims in Washington.

His wife, Emmy Lou Wine, died in 1980. Survivors include four children, Vi Sigler of Jeffersonville, Ind., Lisbeth Werner of Burke, and twin sons, James and Charles Wine, both of Linden; and six grandchildren.