Thirteen years after it cast off communism, Romania is struggling with poverty, corruption, dysfunctional politics, incomplete economic reform -- the list goes on and on. But Romania now sees a one-stop cure for many of its ills: the North Atlantic Treaty Organization.

In Bucharest, Romania's bustling, traffic-jammed capital, N-A-T-O spells relief. Though not yet officially invited to join the alliance, Romanian officials now know that an invitation will be issued at next month's NATO summit in Prague, and they are jubilant.

"It's a new beginning," President Ion Iliescu said in an interview here. Joining NATO will allow Romania "to be integrated into the civilized world, and to receive necessary support for internal reform," Iliescu added.

From points farther West, the inclusion of Romania is seen as part of a somewhat risky and dramatic enlargement of the alliance, from 19 to 26 members, in hopes of further stabilizing democracy and free markets in Eastern Europe. Officials in Washington readily acknowledge that modern Romania is not what usually comes to mind when the phrase "NATO ally" is uttered.

But from here, joining NATO is seen almost as a divine gift -- "manna from Heaven . . . something from God that will transform the country," in the words of Tata Marian, leader of a pro-democracy group in the provincial city of Brasov.

After a decade of post-communist malaise, conditions in this fertile, mountainous nation have recently begun to improve. The economy is growing and a kind of democracy has taken root. But the best news of all is NATO.

Adrian Nastase, the prime minister, said membership would attract foreign investment to Romania's capital-starved economy by assuring outsiders that the country is well defended and stable. It could ease the psychological isolation of the Romanian people and enhance the country's "geostrategic" role in the Balkans, the Middle East and the troubled Transcaucasian region of the former Soviet Union, just across the Black Sea.

"We have come back to our [European] family," Nastase said in an interview, after "an abnormal . . . and very painful" half-century in the Soviet orbit.

Iliescu and Nastase both belong to Romania's ruling Social Democratic Party, a party of former communists who once opposed NATO membership for their country. Now they sing in a chorus of Romanian politicians that spans the spectrum.

Even Corneliu Vadim Tudor, the virulently nationalistic and anti-Semitic leader of the Greater Romania Party who won 33 percent of the vote in a presidential runoff in 2000, said he favors NATO membership. A poet who used to versify the glories of Nicolae Ceausescu, Romania's brutal last communist dictator, Vadim Tudor offered in an interview his own reasons for supporting NATO membership: to parry Hungary, a historic rival and target of Vadim Tudor's venomous bluster that is already a NATO member, and to assure the containment of Russia.

Romania's chances of entering the alliance were slim before Sept. 11, 2001, because of corruption and doubts about the strength of the country's democracy. But a quick reaction to the terrorist attacks on the United States transformed its chances, according to U.S. officials. The Romanians dispatched a battalion of troops to Afghanistan using Romania's own C-130 air transports, allowed the use of their facilities and airspace, and generally showed an eagerness that impressed NATO officials in Brussels as well as the Bush administration.

The Romanian military also did a good job of satisfying its Membership Action Plan, a detailed set of changes in both the military and civilian sectors that NATO assigns applicant countries. Among the goals are strengthening civilian control of the military, promoting the rule of law and improving technical capability to fight alongside other NATO armies.

The Romanian armed forces have shrunk dramatically to about 100,000 from 300,000 in 1989. But at the same time, Romania is spending nearly 2.4 percent of its gross domestic product on defense, more than most West European countries. It is a relatively high cost that all political factions seem prepared to pay for some years to come.

There will be a new Membership Action Plan for Romania to fulfill after next month's invitation to join, and reformers here hope NATO will continue to press their government to make itself more modern and responsive to its citizens. Romania's defense minister, Ioan Mircea Pascu, called the action plan "the instrument through which we disciplined and made more effective our reform process."

Romania's language and culture are Latin in origin, but the country is located in a Slavic neighborhood, bordering Yugoslavia and Bulgaria. Some atlases consider it part of the Balkans, but Romanians demur. "We are north of the Danube River," said Traian Basescu, mayor of Bucharest and leader of the center-left opposition, "an entirely European country." Many Romanians have a romantic image of their history, but skip over the embarrassing bits, like the pro-Nazi dictatorship that ruled the country for most of World War II.

After the war, democratic Romanians hoped the United States, not the Soviets, would occupy their country. But Soviet leader Joseph Stalin had the upper hand in the region, and in 1947 the People's Republic of Romania was proclaimed. The dominant figure of the communist era was Ceausescu, dictator from 1965 until he was executed in the revolution of 1989.

Ceausescu struck an independent pose, even criticizing Moscow for the 1968 invasion of Czechoslovakia, which helped win him trade concessions from the United States. But he became a brutal dictator, and, after a visit to North Korea in 1971, was inspired to make his the harshest government in Eastern Europe. He was the only leader in the region killed during the overthrow of communism.

But removing Ceausescu was easier than excising the effects of 42 years of communism. According to President Iliescu, who many people here feel acted much more like a communist in his first terms in office from 1990 to 1996 than he has since winning reelection in 2000, "we will need two generations to change radically . . . the feelings and perceptions of the people." Romanians from many walks of life complain that their countrymen continue to expect someone else, most often the government, to give them better lives. Or they may steal to improve their lot.

The Romanian language has seven words for "bribe," a verbal wealth that appears to have grown from the avidity with which Romanians ask for and give payoffs and inducements. This habit has deep roots in Romania's history as part of the Ottoman Empire and the Soviet bloc after that.

For example, the Ceausescu government effectively sold thousands of Romanians of German origin to the West German government in the 1980s, exacting a fee for every exit visa granted. The money was apparently funneled to officers of the Securitate, Romania's version of the KGB, and ended up helping some of them become businessmen in post-communist Romania.

Often they bought shares of government-owned companies at bargain prices, becoming millionaires overnight. The new class of wealthy businessmen provides financing for an important part of the ruling coalition here, according to numerous Romanians and Western diplomats.

Businessmen have accrued great wealth thanks to their close relations with a succession of governments, according to observers such as Dorel Sandor, a prominent political analyst and pollster here who now advises the opposition. These ties also have provided millions for political parties and politicians, the analysts said. Opposition leader Basescu said the ruling Social Democrats have developed this mutual back-scratching into a system: "Political corruption has become a mechanism for exercising political power," he said.

Asked why no senior official has ever been charged with corruption, Prime Minister Nastase said this was the realm not of his cabinet, but of the courts. Others point out that the Justice Ministry has the authority to bring cases before the judges, but in Romania, many judges are corrupt. Many are former Securitate agents who got quickie law degrees when communism crumbled.

In some parts of society, corruption seems to be a reflex. The local representative of the U.S. software giant Microsoft Corp. has protested publicly that the Romanian government was using pirated copies of Microsoft software on its computers. According to official estimates, about three-quarters of the software used in Romania has been pirated.

Attacking corruption is hard when so many people are involved. Nastase is known in Bucharest as "Six House Nastase," and leads a life reflecting income far above his official salary. "I don't know where all of his money comes from," said a senior U.S. diplomat posted here.

Asked about the nickname in an interview, the prime minister first said his critics ignored the fact that "each time, I sold one [house] to get another." Then he noted that he has proposed a new tax regulation that would charge owners of more than one house an ever-steeper real estate tax on each one. "If I have these houses," he said, "I am ready to pay higher taxes."

On the economy, there is general agreement that things are finally headed up.

The information technology sector is booming and among the country's fastest growing. Mass media are thriving, too. Ceausescu was terrified of television and allowed only two hours of it a day -- including one hour devoted to his own exploits. Now there are 68 television stations in Romania and a vibrant free press. Overall, the economy is doing much better than in the stop-and-go (but mostly stop) 1990s, which Romanians acknowledge were mostly squandered in fitful attempts at change.

According to Daniel Daianu, a former finance minister and sometime professor at several U.S. universities, inflation is finally under control at less than 20 percent this year, with forecasts of 15 percent in 2003. The banking system is functioning normally, he said, and the economy is enjoying two straight years of more than 5 percent growth. But it is only recovering lost ground. According to President Iliescu, Romanians have about two-thirds the purchasing power they had in 1989.

Mircea Geoana, the foreign minister, predicted in an interview that the good news will begin to multiply. NATO membership and the prospect of a place in the European Union by 2007, which was formally recommended this month by the EU's executive arm, the European Commission, will help ensure that "things are changing fundamentally in this country."

A few voices in Romania are more skeptical. People see NATO as forcing them into good behavior, said Marian, the activist in Brasov, but that is not inevitable. "The real danger is our incapacity to become democrats and capitalists," he said, "and our selfishness to get more money for ourselves."

Unemployed workers sit at a cafe in Pernik, Romania, a town where the jobless rate is more than 60 percent. Romania's president is looking forward to inclusion in NATO as a "new beginning" for the country, which has struggled economically for more than a decade following the end of communist rule.