WAGAH CROSSING, INDIA-PAKISTAN BORDER -- -- If nations rose and fell according to their camp quotient and funny hats, then these rivals would still be locked in a total stalemate.

Most every evening for nearly 60 years, a peculiar ritual has unfolded here on what has been one of the world's hottest borders. As twilight approaches and the gates are about to close between India and Pakistan, the guards on either side face off in an elaborate show of martial bravado and chest-puffing that nonetheless includes that most basic of fraternal gestures: the handshake.

Hundreds of spectators from both countries cheer as their men in uniform strut, goose-step and stamp their feet like impatient bulls. Individual guards on either side break ranks and power-walk toward one another as if to collide head-on, but stop just short of the line dividing their homelands and glower fiercely through their mustaches.

Patriotic songs boom through loudspeakers as the national flags are lowered at exactly the same speed and the gates finally swing shut.

The tightly choreographed ceremony is part colonial pomp, part macho posturing and part Monty Python's Ministry of Silly Walks. The rowdy tourist crowds eat it up.

"Everything was just perfect," Rajat Kalia, an electrical engineer who lives in Delhi, said after a recent viewing. "It's impressive."

It is also, of course, a manifestation of a very real rivalry that has produced three bloody wars since the twin birth of India and Pakistan in 1947.

For half an hour each evening at sunset, the decades of enmity are sublimated in a mostly good-natured, almost comical competition between the men in black, wearing headgear with fantails of the same color (Pakistan); and the men in khaki, whose hats are adorned with scarlet fantails (India).

The theatrics attract audience members from hundreds, sometimes thousands, of miles away. Grandstands on both sides fill up, turning into a sea of colorful saris, tunics and flags.

Like a warmup act before a sitcom taping, emcees on either side prime the crowd, getting the nationalistic juices flowing by leading chants of "Long live Pakistan!" and "Long live Mother India!"

Even schoolchildren pump their tiny fists.

There can be ugly moments. When a Pakistani passenger bus was allowed to cross the border back onto home turf one evening before the gate-closing ceremony began, some Indian spectators jeered, "Stop terrorism! Stop terrorism!"

New Delhi blames the Pakistani government for funding and aiding anti-Indian Kashmiri militants.

But the patriotism soon became something of the relatively benign, Olympic-medal-count variety. Two volunteers were chosen from the Indian crowd to charge the gate while hoisting large national flags. A pair of Pakistanis answered with their national colors, to thunderous applause.

Taking a stab at loving thy nuclear-armed neighbor, a recording on the Pakistani side crooned: "When hearts meet, when the divide is healed. . . . "

The original divide was that of partition, the violent carving up of the subcontinent along religious lines into India and Pakistan when the British Empire pulled out in 1947. Not long afterward, the archrivals instituted the border pas de deux still on display here at the Wagah crossing, which lies about 20 miles from the bustling Pakistani city of Lahore on one side and India's Amritsar on the other.

Over the decades, the ceremony has become such a fixture that, one guard said, it continued to be performed nightly during the most recent Indo-Pakistani war, in 1999, which was fought in the snowy heights of the Himalayas.

The high-stepping legs, scissoring arms, exaggerated salutes and stomping feet of India's Border Security Force guards are big crowd-pleasers, as are similar movements by the Pakistan Rangers.

Individuals and pairs march right up to the border line to go eyeball to eyeball with their opposite numbers. But the "Quien es mas macho?" maneuvers are so campy that the answer seems to be "Neither."

Not all watchers like the implicit message of confrontation, however lighthearted. The concerns arise even though the Pakistani and Indian guards share handshakes, albeit curt ones, at least twice during the ceremony, once around the beginning and again at the end, just before the gates clang shut.

"I don't think it was patriotic. I thought it was very offensive," said Aastha Gulati, 21, a dance instructor from Delhi. "If you're neighboring countries, you should do something together, instead of doing something [over] here and a few meters over there."

Last year, the Indian government appeared to agree with Gulati. To create a more conducive atmosphere for peace talks underway between New Delhi and Islamabad, officials from India reportedly asked their border guards to tone down the aggressiveness of their antics.

Satendra Kumar, resplendent in his khakis, said he and his fellow guards now no longer stand before the Pakistanis with their arms akimbo, as they once did. The Pakistani guards, however, still do that, he noted.

"This is our parade," Kumar said with a shrug. "They do theirs."

The Hindustan Times newspaper protested the suggested dialing-down on its editorial page, describing the ceremony as a relatively harmless spectacle good for drawing in tourists. Officials of the Indian state of Punjab have set aside $1.25 million to develop the border area as a tourist destination.

"It's true that India and Pakistan can be the best of friends, but the show must go on," the paper said.

Kalia, the engineer, found the event a good-humored, patriotic bit of fun, a friendly contest between two rival nations over pomp and circumstance. It wasn't a competition in which national pride and prestige were really on the line.