Germany and Poland will sign a border treaty Wednesday, less than a week after their agreement to formalize the frontier line set at the end of World War II.

Foreign Ministers Hans-Dietrich Genscher and Krzysztof Skubiszewski will sign the accord in Warsaw, the German Foreign Ministry said Monday.In a surprise announcement after talks last Thursday, German Chancellor Helmut Kohl and Polish Prime Minister Tadeusz Mazowiecki agreed to have the treaty signed this month.

Kohl, wary of alienating conservatives among his Christian Democrats, previously stalled on signing a border treaty by demanding a simultaneous accord enshrining the rights of ethnic Germans in Poland.

Both Kohl and Mazowiecki face elections in the next three weeks. Polish and German sources close to both leaders described Thursday's agreement as an electoral compromise.

Quick signature of the treaty will bury lingering Polish fears about its borders and probably boost Mazowiecki's chances against Solidarity leader Lech Walesa in Poland's Nov. 25 presidential elections.

Kohl, leading strongly in opinion polls before all-German elections on Dec. 2, also pledged to lift visa requirements which have annoyed Poles since German unification last month.