It all looks very tidy, a postcard-perfect picture of a small country's capital city. The central square is fenced off to traffic; inside, a flag flaps lazily over the four-story presidential offices, near the white-domed parliament building and a shiny new hotel with red awnings over its outdoor cafe. A few policemen and pedestrians stroll about admiring the view of the local sports stadium and the green plains beyond it.

Upon closer observation, however, the picture becomes stranger. The flags have a curious design: red, blue, and orange stripes punctuated with a jagged white step pattern. In the city center there are no embassies, no branch offices of global banks, no international businesses or ads -- in fact, almost no foreigners at all. The list of U.S. officials who have visited this place in the past 20 years numbers in the single digits.

This is Stepanakert, capital of Nagorno-Karabakh, virtual state and the relic of one of Europe's forgotten wars. Everything in Karabakh -- a mountainous region slightly larger than Rhode Island and home to 100,000 people -- is Armenian and Armenian-run. But Karabakh is still located in the internationally recognized territory of Azerbaijan. The large numbers of men in camouflage fatigues on these streets also tell a story: This would-be state was forged out of conflict, fought over between 1991 and 1994, and 16 years later remains perched on the edge of it. More than 20,000 Armenian and Azerbaijani troops stare at each other from trenches on either side of the cease-fire line.

War is still in the air. The situation on the Line of Contact, as the cease-fire line is known, is a barometer of the health of the peace process, and this year it is in bad shape. In 2009 around 19 people died in shooting incidents there, and 2010 has already matched that level of bloodshed. On the night of June 18, four Armenian soldiers and one Azerbaijani died in a fierce clash, only hours after Russian-mediated talks between the two countries' presidents in St. Petersburg. When U.S. Secretary of State Hillary Clinton visits Armenia and Azerbaijan -- though not Karabakh -- this week, she will raise the issue of the crumbling cease-fire with the presidents of both countries.

Shusha ChurchI have made a dozen or so visits here over the years, and spent a lot of time in these streets and hills, researching my book on the Karabakh conflict. Azerbaijan is so sensitive about foreigners' visits that when I come here, as a sign of respect, I make sure to inform the Foreign Ministry in Baku that I am making the trip (though I do not ask its permission). A lot has changed over the years. When I first came in March 1996, much of Stepanakert was still in ruins from Azerbaijani bombardment; there was nowhere decent to stay, and virtually no shops were open. Since then the city has been completely rebuilt. The little de facto Armenian state has become a pet project for many diaspora Armenians, who fund a school here, a clinic there. The final stretch of road into Stepanakert bears a sign saying it was funded by the Armenian community of Argentina.

Most of the funding for the territory's annual budget of $200 million comes directly from the government in the Armenian capital of Yerevan, making Karabakh, economically and militarily, an outpost of the Republic of Armenia. Yet the state of siege has given the Karabakhis a very different outlook. The Karabakh Armenians always prided themselves on being highlanders, more stubborn and hardy than their cousins across the mountains in Armenia proper. First war and then international isolation have hardened their defiant streak. A decade ago, the locals in war-shattered Stepanakert were only too glad to share their problems with me. Now their message to the outside world is, "You're not talking to us, so why should we talk to you?" As a rare visitor, I am treated like an emissary from a whole international order that has rejected them.

There is a logic to this intransigence. The Armenians of Karabakh do not even have a place at the negotiating table in the talks over their own future -- that is handled by the sovereign governments of Armenia and Azerbaijan. The agreement being hammered out by the two countries will offer the Karabakh Armenians "international guarantees," including some kind of international peacekeeping force, in return for them giving up territory to Azerbaijan. But no international official has ever spelled out to the Karabakh Armenians what these guarantees will be. Whenever I raise this issue in Karabakh, I get a negative response. "Name me a successful international peacekeeping mission," says one Karabakhi friend.

There is a tough answer for everything. When I visit my old acquaintance Vartan Barseghian, deputy minister in Karabakh's de facto foreign ministry, the tone is friendly but the message is implacable. "We can't talk about peace when our enemy is preparing for war," says Barseghian. "Our soldiers and civilians need to know they should be ready for war."

"We now have full independence, but just lack the formalities of it," he says. "Achieving those formalities is not an end in itself. We will not sacrifice anything to achieve it."

Shusha Town CenterWorryingly, this vision of statehood increasingly extends beyond the borders of Nagorno-Karabakh itself. In 1993 and 1994 the Armenians consolidated their hold on the enclave of Karabakh by conquering, wholly or partially, seven regions of Azerbaijan surrounding it. At first, they talked about these lands as a security zone to be given up in return for concessions from Azerbaijan on the final status of Karabakh. Years later, the lands still lie empty, the towns and villages in ruins, but the local Armenians increasingly think of them as "ours." Farmers have begun to plant and harvest there, and a little museum has opened to display archaeological finds from what Armenians claim is the ancient Armenian city of Tigranakert, located in the Azerbaijani region of Agdam.

These villages and towns were also of course home to hundreds of thousands of Azerbaijanis, who are still refugees in sanatoria and makeshift housing across Azerbaijan. The issue of their rights is the most sensitive one here, and whenever I raise it, the Armenians push back hard, always making the point that Armenians were also made refugees by this conflict. Fair enough, but most of the Armenian refugees were displaced from Azerbaijan in Soviet times, and have long since made new lives elsewhere. Like everything else in this conflict, the argument is an instrument to absolve your own own side of the obligation to take any constructive steps forward.

During my visit to Karabakh earlier this month, I took the winding road up to the hilltop town of Shusha. It is an Azerbaijani name for a town whose majority population for most of the past century was Azerbaijani; the Armenians call it Shushi. There is no way you can erase Karabakh's multiethnic past here: Once this was one of the great towns of the Caucasus, home to grand theaters and caravanserais, mosques and churches, and a posh school where the local bourgeoisie groomed their sons for careers in St. Petersburg. Now, 18 years after the Armenians captured the town and then burned it, it is still a sad wreck. Only the church has been properly reconstructed, but when I slipped inside its echoing marble interior, I was the only visitor. The town's two mosques have been tidied up, but not fully restored. The once imposing facade of the school stands in a forlorn ruin.

Will Azeris ever come back here? At the moment, there isn't even a hint of that possibility. Almost all local Armenians flatly reject the idea. That of course enrages Azerbaijan, which feels that its territory has been ripped up and its people expelled in an act of war. And it pushes the Azerbaijani government harder into an aggressive line that has got it nowhere in 16 years. The default policy is total isolation of Nagorno-Karabakh and an outright refusal to work with Armenian "aggressors" on any issue. That policy has led the Azerbaijani government to reject almost all international proposals for confidence-building measures, including sharing water with Armenian farmers or withdrawing snipers from the cease-fire line in the name of reducing casualties. Even Azerbaijan's normally urbane foreign minister, Elmar Mammadyarov, recently declared, "the final stage of negotiations will be the time when the Azerbaijani flag will be flying in Khankendi" -- the Azerbaijani name for Stepanakert.

Each black-and-white position sharpens the other. Offered nothing by Azerbaijan, the Karabakh Armenians just carry on their slow, quiet business of building a de facto state, looking to their small band of friends in Armenia, the diaspora, and a few surprising allies in the U.S. Congress, which gives Karabakh $8 million a year in humanitarian and development aid. In a sense, neither side has stepped off the path it took when this dispute first broke out in 1988, when Mikhail Gorbachev was in office and the Karabakh Armenians appealed, unsuccessfully, to allow their territory to leave Soviet Azerbaijan and join Soviet Armenia. Since then, the two countries' post-Soviet incarnations have been engaged in a game of you-win-I-lose, each demanding total surrender from the other.

I like the Karabakh Armenians, even in their dourness. I understand their predicament. But I worry that their inflexibility, once a rhetorical stance, is hardening to the point where they will not take a good chance for peace if one is offered to them. And my heart also aches for the refugees I meet in Azerbaijan, some of whom live only a few miles on the wrong side of the cease-fire line from their shattered empty homes in Armenian-controlled territory. The endlessly deadlocked peace talks between the two sides give them no prospect of a return home anytime soon.

I also worry that sooner or later, someone will overstep the cease-fire line even more brazenly and a war will break out here again. No military analyst thinks that this is a war that anyone would win. It would spell catastrophe not just for Armenians and Azerbaijanis, but for the entire South Caucasus, including Georgia, Iran, Russia, and Turkey, not to mention the Caspian Sea energy pipelines. But, buoyed by oil revenues, Azerbaijanis speculate ever more openly about reconquest. Baku spent more than $2 billion on its army last year, almost matching the entire Armenian state budget. One day, Azerbaijan, increasingly politically closed, inward-looking, and disconnected from the West and its arguments, might make the wrong move for the wrong reasons.

On the last day of my trip, I went on an excursion to the south of Karabakh. We drove through green-carpeted pastures and lush woodland, reminding me why this little bit of paradise is so coveted by both Armenians and Azerbaijanis. Eventually we reached the little town of Hadrut, at the head of a valley, looking down to the Armenian-held plains of Azerbaijan that stretch down to the Iranian border. The Armenians have always been the highlanders here, the Azeris the plain-dwellers.

Another winding road took us up again to a tiny 12th-century Armenian church, named Siptak Zham, on a rocky promontory. These medieval churches and the proof they present of Karabakh as an Armenian Christian territory are part of the stony narrative the Armenians spin for their cause. We wandered through a graveyard full of thistles and bird song. My traveling companions squinted at the tombstones, deciphering the faint inscriptions in the medieval Armenian script. I stepped into the little church. It was all stone, virtually bare but for orange wax drippings from a few candles and a couple of nesting birds. The altar was a strong stone slab. Beautiful, remote, stony -- that, too, was the character of Nagorno-Karabakh and its admirable but hard Armenian inhabitants, refusing to bend to the outside forces brought to bear on them.