Kazys Skirpa, 84, who was prime minister of Lithuania for six weeks in 1941 before he was deposed and later imprisoned by invading German forces, died Saturday at Suburban Hospital in Bethesda after a heart attack.

Mr. Skirpa left Lithuania following the war and lived in France and Ireland before coming to this country in 1949. He worked for the Library of Congress for 16 years before retiring as a senior research librarian in 1965.

Mr. Skirpa was a native of Nemajunas, Lithuania, and studied law in Lithuania before graduating from a military academy in Brussels, Belgium.

He rose to the post of Army chief of staff, served as military attache in Berlin in the late 1920s, and later represented Lithuania at the League of Nations, in Poland, and again in Germany.

Lithuania, which had been part of the Russian Empire, gained its independence following World War I. Soviet army units occupied the country in late 1939 and established a communist government.

Mr. Skirpa became prime minister of Lithuania on the day following the Nazi invasion of the Soviet Union in June 1941 and urged resistance to Soviet rule in Lithuania. Six weeks later, German forces occupied Lithuania and deposed Mr. Skirpa's national government.

Mr. Skirpa was the author of the 1973 work, "Uprising for the Restoration of Lithuania's Sovereignty," which was published in the Lithuanian language.

He is survived by his wife, Brone, of the home in Washington; a son, Kazys K., also of Washington, and two grandchildren.