President Zelaya told supporters the court was not serving democracy
Tensions are rising in Honduras after President Manuel Zelaya ignored a court order to reinstate the army chief.
Mr Zelaya fired Gen Romeo Vasquez after he refused to help with a referendum on constitutional change that could allow the president to seek a second term.
Both Congress and the courts have already deemed the planned referendum unlawful.
The Supreme Court ordered Gen Vasquez reinstated on Thursday but Mr Zelaya told crowds he refused to comply.
"We will not obey the Supreme Court," the president told cheering supporters in front of the presidential offices.
"The court, which only imparts justice for the powerful, the rich and the bankers, only causes problems for democracy," he said.
Mr Zelaya was elected in 2006 and under the current constitution is barred from standing for re-election.
He wants to hold a referendum on Sunday to ask Hondurans if they approve of holding a vote on unspecified constitutional change at the same time as the presidential election in November.
Army chief Gen Romeo Vasquez said he could not break the law
On Tuesday, the Honduran Congress passed a law that appeared to block these plans. The new bill prevents the holding of referendums or plebiscites 180 days before or after general elections.
Armed forces chief Gen Romeo Vasquez then said he could not help to organise the referendum as he would be breaking the law.
Military leaders refused to deliver ballot boxes for the vote - a move that led to the sacking of Gen Vasquez and the resignation of Defence Minister Edmundo Orellana on Wednesday.
The heads of the army, navy and air force also resigned in protest.
Early on Thursday Mr Zelaya and his supporters entered a military base and removed ballot boxes that were being stored there.
The military, meanwhile, deployed hundreds of troops in the capital, Tegucigalpa, saying it wanted to prevent disturbances by the president's supporters.
The BBC's Stephen Gibbs says that the political situation in the country appears to be becoming increasingly unstable.
The Organisation of American States has called a meeting on Friday to discuss the crisis, the Associated Press news agency said.