MEDYKA, Poland (AP) _ Out here on the new fault line of a changing Europe, geopolitics has reversed the perspective of Polish border guards.

They now use the equipment of their former enemies to the west and keep watch for trouble from their former allies to the east.

Communist-era trappings _ Soviet jeeps and East German weapons _ have been discarded. Guards drive British Land-Rovers and use Austrian guns.

``It was hard to expect that history would turn this way,'' said Maj. Leszek Chudzik at the Medyka border crossing, 210 miles southeast of Warsaw. ``But we have always been part of Europe.''

With NATO membership coming on March 12 and negotiations on joining the European Union continuing, Poland finds itself in the middle of a complex continental transition. Cold War enemies in western Europe are now allies while Warsaw Pact neighbors lose their comrade status.

NATO and the EU expect a sturdy barrier along Poland's 774-mile eastern border to guard against instability or any security threat from former Soviet states.

In addition, the EU wants to keep out illegal immigrants who regularly try to escape economic hardship in the former Soviet Union, Asia and the Indian subcontinent to a new life in western Europe.

Poland accepts its responsibility as a watchdog, with some reservations. Officials warn against making the border a reincarnation of the Iron Curtain, with restrictive visa policies aimed at poorer neighbors.

``Shall the country for which traveling to the West used to be the measure of regaining freedom introduce limitations?'' Foreign Minister Bronislaw Geremek, a former anti-communist activist, asked recently in an interview with the newspaper Polityka. ``The borders have to be controlled but not closed.''

The question of the border's porousness affects the livelihood of people like Natalia Leusz, a 30-year-old unemployed dressmaker from the Ukrainian border village of Shegyni. She crosses the border daily with a lone bottle of vodka bought for $3 in Ukraine. It sells for $8 in Poland.

``This is what we live on,'' Leusz said. ``If Poles close the border, it will be tough.''

Poland already has spent $24 million of EU money to tighten its eastern border, but still has a long way to go to meet Western standards.

``We have to speed up if we want to have any chance of entering the EU,'' said Lt. Miroslaw Szacillo, a national border guard spokesman.

The Polish government allocated $8.5 million for bolstering the border guard force this year, five times more than last year.

But guards still work eight hours a week longer than the regulation 42 hours, said Chudzik, who patrols in the southeastern Bieszczady Mountains. Overall, the 14,000 border guards are about 30 percent fewer than needed, officials say.

``A commander knows he should send two people to patrol the border but he has just one,'' Chudzik said.

A Soviet-era system of wiring the 12-yard-wide border strip to signal when anyone crosses remains in use. Intended to catch spies during the Cold War, the system must do until infrared sensors and other more modern surveillance and detection equipment becomes available.

When Poland's borders opened after the fall of communist rule in 1989, there was a dramatic increase in illegal immigrants.

``The immigration wave rolled in and was stopped only on the German-Polish border,'' said Szacillo, the border guard spokesman. ``Now, immigrants know we have better infrastructure and go south through the Czech Republic and Slovakia.''

In 1992, border guards detained about 30,000 illegal immigrants on the Polish-German border. The number dropped to less than 6,000 inside Poland in 1998. The number of people sent back by Germany fell 40 percent to 5,432 last year from 1997.

Meanwhile, the Czech Republic detained a record 45,000 illegal immigrants in 1998, and the number of aliens returned by Germany rose to 15,684, a 50 percent jump from the previous year.

Alessandro Missir di Lusignano, an EU official based in Warsaw, said Poland has made significant progress but still must modernize management of the border guards, upgrade equipment and build more border posts and crossings.

The average distance between border posts on Poland's western frontier is nine miles, compared to 28 miles in the east. Poland plans to build 18 new eastern posts by 2002.