The Palestinian Authority president has ordered an investigation after border guards caught a senior Hamas official bringing 600,000 euros into Gaza.
Hamas gunmen rushed to the scene of the border incident
The cash, worth more than $800,000 (£427,000), was initially confiscated and the man, Sami Abu Zuhri, detained.
After frantic talks, Mr Zuhri was freed and Hamas said the cash would go to the interior ministry, which it controls.
The PA has been in financial crisis since Israel and the West cut funds in a bid to make Hamas renounce violence.
PA President Mahmoud Abbas asked the attorney general to investigate the border incident, which comes at a time of heightened tension between Hamas and supporters of Mr Abbas.
Dozens of Hamas gunmen rushed to the Rafah border crossing, which is guarded by presidential troops, when news of Mr Zuhri's detention spread - raising fears of fresh fighting.
Overnight, two police officers were wounded in a gun battle between Palestinian factions in Gaza City.
Mr Zuhri is a well-known figure because of his frequent appearances in the Arabic media.
"Sami Abu Zuhri did not declare the money. The Palestinian security and customs officials found it and confiscated it," said European Union observer Julio de la Guardia told reporters.
Travellers crossing through Rafah must normally declare all sums over $2,000 and explain the origin of the cash.
Mr Zuhri was returning to the Gaza Strip from Qatar, which recently pledged to donate $50m to the Palestinian Authority.
The money was said to have been stashed under his belt.
"I was bringing a sum of money which was donated by our people abroad for the Palestinian people," he told journalists.
"If bringing support for my people is a crime then I am very proud of this crime," he told Reuters news agency.
Mr Abu Zuhri is a well-known spokesman for Hamas in Gaza
Hamas has complained that US and European sanctions - imposed because those countries consider Hamas a terrorist organisation - make it impossible for Qatar and other donors to transfer money to the Palestinian government.
Fatah officials have demanded a full explanation of the source of the euros, warning of a possible violation of party funding laws, which ban foreign financing.
"Raising funds in the name of the Palestinian people is unacceptable if the aim is to finance the activities of a certain party," said Fatah spokesman Jamal Nazzal quoted by Voice of Palestine radio.
Overnight clashes came after two rival security forces - regular police and a newly deployed force established by Hamas - paraded through the streets in a show of strength.
Hamas has formed its shadow security force in defiance of a veto by Mr Abbas. The unit is led by Jamal Abu Samhadana, a militant who is wanted by Israel.
The force includes some members of Hamas' military wing as well as others from existing security forces.
Its stated role is to ensure the safety of citizens and protect property amid a wave of instability and violence.
Hamas officials announced the creation of the new force in April, after Mr Abbas appointed one of his supporters to lead the most important of the three branches of the security services that report to the interior ministry.