MOSCOW, AUG. 21 -- The Baltic republic of Latvia today declared its immediate independence from the Soviet Union, following similar action in neighboring Estonia on Tuesday.

The parliamentary declaration by the Latvians came hours before Soviet troops, who seized control of strategic locations in the secessionist Baltic republics during the right-wing coup against Soviet President Mikhail Gorbachev, began withdrawing to their bases early this evening.

All three Baltic republics, including Lithuania, now have declared their independence, although their actions have not been recognized by Moscow. The three were independent nations before Soviet troops occupied them in 1940 under a secret Nazi-Soviet protocol.

While the declarations are largely symbolic moves at this time, they nonetheless are likely to increase political pressure on the Soviet leadership. The splintering union has been a cause for concern among hard-line leaders, and it is cited as a major reason for the coup attempt, which failed today.

According to reports from Lithuania and Latvia, Soviet troops this evening began pulling out of radio stations and other government facilities that they had occupied during the coup and, in some cases, since an earlier crackdown in January. It was unclear last night whether the troop movements were being directed by Moscow and, if so, by whom.

The independent news agency Baltfax reported from Vilnius, the capital of Lithuania, that military division commanders contacted local government officials about 5 p.m. and told them that the occupation was ending immediately and that they should be prepared to resume control of all facilities. In addition, the military was disbanding all roadblocks and checkpoints. The news service reported that by 6 p.m., the occupied facilities in Vilnius and several other Lithuanian cities, including the long-distance telephone exchange and a television center, had been abandoned by the Soviet army.

Earlier in the day, apparently in response to reports that leaders of the right-wing coup had fled Moscow, Lithuanian President Vytautas Landsbergis ordered airport authorities to bar from landing any aircraft containing "the criminals against state and Soviet people, leaders of the unsuccessful overthrow."

John Hartsock, a freelance writer in Latvia, said this evening that he watched a busload of soldiers leave the main radio station in Riga, Latvia's capital. While there was a widespread sense of relief at the troops' departure, many people "are still concerned that the Black Berets may operate like rogue bandits," Hartsock said, referring to the special Interior Ministry forces that staged a similar military crackdown in January that resulted in 18 deaths in the three Baltic republics.

Latvian officials reported that one person, the deputy chairman of Latvia's television and radio committee, died today as a result of injuries sustained in the Soviet military occupation on Tuesday.

In Vilnius, one Lithuanian security guard was killed and three people wounded when guards and Soviet troops exchanged gunfire late today at a checkpoint near the parliament building, the Associated Press reported.

Hartsock said that with today's independence vote by the Latvian parliament, "there is a sense that for the moment the republic of Latvia is a free country."

After the Estonian parliament declared its independence Tuesday, representatives of the Russian republic announced that their republic would recognize the declaration.

Staff writers Barton Gellman and John Lancaster reported from Washington:

Representatives of the Baltic states in the United States said they had chosen the central government's moment of greatest weakness to press their claims of independence. They said the coup's collapse would improve their prospects for a clean break from the Moscow government.

"We are convinced that Yeltsin is now, at least politically, number one in power in the Soviet Union, and we are allies of Yeltsin and have very good relations," said Stasys Lozoraitis, Lithuania's charge d'affairs in Washington.

"The reactionaries and the military have after all lost, and we will come to a favorable conclusion of the whole thing," he said.

Aarand Roos, a consul at the Estonian legation in New York, said in a telephone interview today that Tuesday's declaration of independence by the Supreme Council of Estonia was irrevocable. But, he acknowledged, "in practical terms, it depends very much on Moscow's stand what will happen next."

Roos, who said he has been receiving regular fax messages from the Estonian Foreign Ministry in Tallinn, described Estonian officials as heartened by statements of support from Russian Foreign Minister Andrei Kozyrev. "Nobody is going to take it back," he said of the independence vote. "You don't do that with independence declarations."

Ojars Kalnins, a spokesman for the Latvian legation here, said the Latvian parliament voted 133 to 13 for independence, declaring that "they are now the successors of the last independent government of Latvia."

"It was just felt that because of the crisis, they should fully declare their independence and take their chances," he said, adding that Yeltsin's expressions of support for Baltic independence should make the declaration easier to uphold now that Gorbachev has returned to power.

Estonia, Latvia and Lithuania have been the site of extensive military activity since the hard-line coup against President Mikhail Gorbachev began on Monday. The three republics were considered key targets because of their prominence in the battle for secession from the Soviet Union.

Early last year, legislatures in all three Baltic republics moved to restore their prewar independence, lost to the Soviets in 1940. On Tuesday, Estonia delcared full, immediate independence, followed by Latvia yesterday. Lithuania declared its indenpendence in March 1990. All three states have been under intense political, economic and military pressure to remain part of the Soviet Union.

LATVIA

Area: 24,695 square miles, roughly the size of West Virginia.

Population: 2,681,000; 51.8% Latvians, 33.8% Russians, 14.4% others

Economy: Agriculture is central to the economy, with grain, sugar beet and livestock production the most significant. Riga is the country's second largest port after Odessa, based on total trade.

Background: Latvia has tried to work closely with Moscow in developing a cautious approach to independence.

LITHUANIA

Area: 26,173 square miles, roughly the size of Vermont, New Hampshire and Masssachusetts combined.

Population: 3,690,000 (1989 census) (80.1% Lithuanians, 8.6% Russians, 11.3% others)

Economy: Main industries are agriculture, shipbuilding, construction and paper. The country was mainly agricultural until 1940. Today more than 60% of the population is urban.

Background: Lithuania, the republic with the largest percentage of non-Russian ethnics in the Soviet Union, has led the drive for independence among the Baltic states.

ESTONIA

Area: 17,413, roughly twice as big as Maryland.

Population: 1,573,000 (61.5% Estonians, 30.3% Russians, 9.2% others)

Economy: Major industries are textiles, shipbuilding, timber, mining equipment and oil refining.

Background: The smallest of the Baltics is forging increasingly strong ties with neighboring Finland and other Scandinavian nations. Compiled by James Schwartz NOTE: Population figures are from 1989.