When they were kids, the Kaczynski twins were a pair of tricksters. Friends could barely tell them apart, let alone teachers. Jaroslaw, the older by 45 minutes, would take science tests for his brother, Lech, who would return the favor on language exams.

Today, the Kaczynski brothers are teaming up again, this time in a bid to take over the Polish government. Lech is running for president on Oct. 9. Jaroslaw is mounting a separate campaign to become prime minister in parliamentary elections Sunday.

The brothers' Law and Justice party, of which Jaroslaw Kaczynski is chairman, is locked in a dead heat with its chief rival, the Civic Platform, for control of Parliament, opinion surveys show. Lech Kaczynski, the mayor of Warsaw, is trailing in the presidential contest by a margin of several points, according to recent polls. But analysts say both contests remain highly volatile and that there is a real chance the twins could gain joint control of the country.

The Kaczynskis' chubby faces have been a familiar sight in Poland since 1962, when as 12-year-old actors they hit it big in the movies, playing identical twins in the classic Polish children's movie "Those Two Who Would Steal the Moon."

They returned to prominence in the 1980s, playing key roles in the Solidarity trade union movement that helped end communism in Poland, and have remained active in national politics since then.

The brothers, now 56, have had to confront skittishness among some voters who worry it might not be a good idea for the temperamental, tough-talking pair to take charge of Poland at the same time. To dispel such anxiety, Jaroslaw Kaczynski has pledged to hand over the prime minister's job to someone else in their Law and Justice party should both he and his brother win.

Many Poles are skeptical that the brothers would willingly give up power, however. That notion is reinforced by Lech Kaczynski himself, who would not rule out the possibility in an interview on Wednesday in Gdansk, the Baltic seaport and birthplace of Solidarity.

"My brother said that if I win, he won't serve as prime minister," he said, a grin spreading across his face. "I think that would be a limitation of our civil rights."

The elections come at a pivotal moment for Poland, one of the United States' most loyal allies and a member of the U.S.-led military coalition in Iraq. There is no political debate on issue, and the twins are supportive of Poland's current position.

Sixteen years after the collapse of communism, the country's economy is still struggling to complete the transition to capitalism. The jobless rate stands at 18 percent, the highest in Europe. Businesses have been trying to become competitive internationally, especially since Poland opened its borders to join the European Union last year.

The democratic system also remains in flux. Political parties come and go, their existence often based more on the personalities of their leaders than on their policies.

Polish voters have ejected a succession of governments since they gained their freedom, and this election promises more of the same. The incumbent Democratic Left Alliance, consisting of former Communist Party members, has been damaged by a series of corruption scandals and lags far behind in opinion polls.

Although the Kaczynskis have avoided appearing together during the campaign, there is little doubt that they come as a package deal. They talk on the telephone at least six times a day and are inseparable in their politics.

"I don't hide the fact that we are close to each other," Lech Kaczynski said. "Ninety percent of the time, the one who comes up with the ideas is my brother. I'm usually the one who carries them out."

The Kaczynskis founded the Law and Justice Party in 2001 and have vowed to crack down on bureaucrats who profit from the privatization of state-controlled industries and other schemes. They have also promised to cut payroll taxes in hopes of generating jobs, while at the same time protecting social welfare programs.

Their physical resemblance is so striking that the only sure way to tell them apart is to look for a prominent mole on the bridge of Lech Kaczynski's nose, a facial feature his brother lacks. However, the mole is conspicuously absent from the huge photograph of Lech Kaczynski that appears on campaign posters and billboards around the country.

As the mayor of Warsaw, the capital, Lech Kaczynski built a reputation for going after corrupt bureaucrats, as well as for speaking out against other perceived threats, including Russians, Germans and former Communists. He has refused to allow gay rights groups to hold a parade in the city, drawing the ire of human rights groups but the backing of Roman Catholic leaders.

His primary opponent in the presidential race is Donald Tusk of the Civic Platform party, which favors a 15 percent flat tax but otherwise is ideologically similar to Law and Justice. Tusk is the favorite, but his lead in the polls has diminished, thanks to an onslaught of mud-slinging.

"For the very last time, I appeal to the Kaczynski brothers to give up their political tactics, which are dangerous for Poland, and instead to confirm their readiness for building up a good and wise government," Tusk told reporters Thursday in Gdansk.

Analysts say neither party is likely to obtain a majority in Sunday's legislative elections and will probably be forced to join in a governing coalition.

Many Poles are tuning out the political quarrels, and only about half of eligible voters are expected to cast ballots in the legislative elections. Lena Kolarska-Bobinska, director of the Institute of Public Affairs in Warsaw, said Poles were generally more optimistic about the economy and the country's future than they were a few years ago. But they still lack faith in the ability of government officials and politicians to address everyday problems.

"More often than not, people don't vote," she said. "People stay home instead. They say all the political elites are alike and don't think they are credible or to be trusted."

Still, approval ratings for the Kaczynskis have risen as they have moderated their styles. The notion that the brothers could serve simultaneously as president and prime minister doesn't seem so foreign, Kolarska-Bobinska said.

"They aren't scaring people so much," she said. "They are behaving much less radically than they used to. Besides, we are a family-oriented society. We like brothers and sisters."

Outside the shipyard in Gdansk, where the Solidarity movement was born, several voters said in interviews that they held mixed opinions of the Kaczynskis.

Stanislaw Wnuczek, 49, the mayor of a village in southeastern Poland who was leading a tour of the Solidarity Square memorial, said he would vote for Law and Justice in the parliamentary elections but wasn't sold on Lech Kaczynski for president.

"I am not thrilled with his character as a man," Wnuczek said. "Sometimes his sentences are not very diplomatic. He can sound like a dictator. We may not be thrilled with him personally, but we like his program. We know he will protect poor people."

In Warsaw, Danuta Julikowska-Kmiolek, 43, an accountant, said she was impressed by Lech Kaczynski's performance as Warsaw's mayor but was leaning toward voting for Tusk.

"He did a lot for Warsaw, so maybe he will do the same thing for Poland," she said, referring to Kaczynski. "On the other hand, I'm scared of his radical views. He can be a little intemperate sometimes."

Regardless of how the elections turn out, the odds are overwhelming that Poland will be ruled by someone with a June 18 birthday.

That's the birthday not only of the Kaczynski brothers, but also of the other leading candidate for prime minister, Jan Rokita of the Civic Platform. That gives all three politicians the same astrological symbol: Gemini, the sign of the twins.

Travelers wait for a train in Warsaw under a poster of presidential candidate Mayor Lech Kaczynski, whose brother is running in parliamentary elections.