Outspoken Respect MP George Galloway has finally been allowed into Egypt after being detained and spending the night in a cell.
George Galloway was due to attend an anti-Iraq war event
The politician went to the Middle East on Friday after being invited to join an event against the war in Iraq.
Anti-war activists in Egypt who invited him protested to their government, Respect said.
The Bethnal Green and Bow MP had been detained "on grounds of national security" on arrival at Cairo airport.
He was stopped and detained all night in a cell with several others, a spokesman for his party said.
"Just before he was about to board a plane back to England the Egyptian government appeared to change its mind that Galloway was a 'national security threat' and allowed him in," the spokesman added.
The MP has now contacted his supporters and he accused Egypt of being "undemocratic police state", his spokesman said.
Mr Galloway said he was kept overnight in a cell and had to sleep on a metal chair and was given no food or water
He had travelled to Egypt to give evidence at a "mock trial" of Tony Blair and US President George Bush.
The spokesman alleged that the Egyptian authorities waited until the 'trial' was over before allowing him to enter and accused them of "subterfuge".
He said: "If when he arrived the reason he was refused entry was a security matter, there was still a security matter when they let him go."
'Cause of peace'
Mr Galloway has visited Egypt many times as part of his anti-war campaigning.
A spokesman for Respect said Mr Galloway has been a critic of Mubarak "and of other pro-western governments in the Middle East".
He added: "Mubarak of course enjoys very warm relations with George Bush and Tony Blair.
"The Respect Party deplores the decision of the Mubarak government to bar entry to a British MP visiting Egypt purely for the purposes of promoting the cause of peace."
Mr Galloway has recently sparked controversy in the UK by becoming a contestant on Channel 4's reality show Big Brother.
The Respect MP, who was not paid his Commons salary while on TV, has been accused of letting down constituents - and was ridiculed for impersonating a cat.