HARARE, Zimbabwe (CNN) -- Zimbabwe's highest court Friday ordered President Robert Mugabe to ensure the African country holds elections by the end of July.
Chief Justice Godfrey Chidyausiku said that out of a nine-judge panel only two had dissented to the ruling he delivered.
Mugabe "is hereby ordered and directed to proclaim dates for presidential, general elections ... which elections should take place not later than 31 July 2013," he said in a packed Supreme Court chamber.
The ruling was made after a former journalist with a defunct daily newspaper asked the court to order Mugabe to call for elections by end of June.
Zimbabwe's parliament expires automatically on June 29 but Mugabe would have had until October 31 to hold elections.
Earlier this week the country's finance minister, Tendai Biti, told journalists that Zimbabwe was struggling to raise the $132 million needed for conduct elections.
The elections -- to be held under a new constitution endorsed in a referendum in March -- will end the power-sharing government of Mugabe and Prime Minister Morgan Tsvangirai formed in 2009.
That followed a violence-marred election in 2008 in which Mugabe had claimed victory but regional leaders regarded as a sham.
A new constitution was one of the conditions set by regional leaders before fresh elections.
The new constitution limits the president to two five-year terms. Mugabe, 89, has been in power since 1980, when Zimbabwe attained independence from Great Britain, but may seek another term because the new charter does not apply retroactively.