Egypt's first post-revolution vote will shift the political scene in favour of Palestinian Islamist movement Hamas, whether or not the Muslim Brotherhood wins, analysts and Hamas officials say.
Despite a spike in unrest, Egyptians are to start going to the polls on Monday and expected to elect a government led by the Muslim Brotherhood, a group that in effect gave birth to the Palestinian group.
"That is going to reflect positively for Hamas," said Mukhaimer Abu Saada, a political science professor at Gaza's Al-Azhar University.
"The bottom line is that Hamas is a branch of the Muslim Brotherhood movement, most of its leaders were trained in Egypt."
Abu Saada said a Brotherhood victory would see Egypt expand its support to Hamas and the Palestinians, with measures to ease the passage of people from Israeli-blockaded Gaza into Egypt a top priority.
Naji Shurrab, also a professor of political science at Al-Azhar, said Hamas would have much to gain from ties with a Muslim Brotherhood government.
"It will open a relationship with Egypt that is very different," he told AFP.
"Maybe Hamas will be recognised by the Egyptian government, the restrictions on the Rafah border crossing will be lifted, (Hamas prime minister) Ismail Haniya will be recognised as a partner, maybe."
Hamas spokesman Taher al-Nunu acknowledged that a Muslim Brotherhood win would be a positive thing for the Islamist movement.
"We have the same ethics as the Muslim Brothers, the principles are the same," he said.
But Hamas would not "interfere" in the Egyptian elections and sought ties with a range of Egyptian political parties, he said.
"We want support from all the Egyptian parties because each one has an effect," he said. "We don't just want to have support from the Muslim Brotherhood."
Signup to our newsletter and follow us on Facebook and Twitter!
Aside from the Brotherhood, Nunu said he had met with leaders from seven of Egypt's major political groups to deliver messages from Hamas's leadership.
"The first was that we respect you and we will respect the will of the Egyptian people," he said. "Two, we want to have good relations with you -- now and in the future, whether you win the elections or not."
But Shurrab said ties between Hamas and the Brotherhood would govern those relations.
"Hamas cannot have special relations with the other Egyptian forces without the Brotherhood, it will be through the door of the Brotherhood."
Walid al-Modallal, a political science professor at Gaza's Islamic University, said Hamas stood to benefit whoever wins the elections.
"If the rulers of Egypt represent the people, they will support the Palestinian cause," he said. "And Hamas did not involve itself in any activities regarding the internal situation in Egypt, so it really has a clean slate."
Nunu said Hamas was already experiencing warmer ties with post-revolution Egypt, where the former regime mistrusted the movement, in part because of its links to the Muslim Brotherhood.
The better relations helped push Hamas and long-time rival Fatah towards a reconciliation deal, which analysts said they expected would hold, even with Hamas strengthened by a friendly new regime in Cairo.
Modallal said Hamas was "serious" about the reconciliation and Shurrab noted that Egypt's ruling military council, which is likely to retain some power even after the vote, strongly supports the process.
"The Egyptian army wants to deal with the Palestinians through one government, so I think the army will put all their efforts into ending the division."
Hamas's warmer ties with Egypt have prompted speculation it might seek to move its offices from Damascus in Syria, which has been rocked by a violent crackdown against a protest movement, to Cairo.
But Nunu insisted that no such move had been discussed, and that Hamas was committed to maintaining neutrality in Syria.
"Some people outside Hamas say 'Hamas should move, Hamas wants to move,' it's not reality," he said.
"If we continue in our policy to not intervene in the conflict in Syria, everyone will respect us... We are not with the regime against the people and not with the people against the regime."