Ministry delegate Jose Fernandez Chacon said on Tuesday: "A third fence was being studied and would be built with urgency."
He said the measure was part of a plan that last week saw the deployment of troops and a speeding up of work to heighten one of the existing two fences.
Hundreds of poor sub-Saharan African immigrants, gathered in northern Morocco, have stormed the fences over the past two weeks in a bid to enter Europe.
Five were killed in a similar charge last week at Ceuta, Spain's other enclave on the northern Moroccan coast. Both city enclaves have twin 3m (10ft) razor fences spanning their perimeters.
Fernandez Chacon's comments came a day after 650 Africans ripped through a section of the Melilla barrier and clashed with police in the biggest border rush yet.
About 135 immigrants were injured, as were seven police officers. Some of the Africans threw rocks at the police, the interior ministry said.
Spain is in the process of doubling the height of the inner fence along the Melilla border. Monday's surge occurred at a spot where the fence had already been raised.
The immigrants have spent
months travelling north
Last week, two groups, estimated at 500 men each, tried to cross the fences at their northern and southern tips, areas where construction has yet to begin. About 300 got in.
After scaling a first fence topped with razor wire, the men clambered up the newly elevated second fence.
The two are separated by a strip of land. Police said the weight of so many men hanging on at once brought down two 20m strips of the upper half of the fence, also covered with razor wire, leaving gaping holes.
Pieces of ripped clothing could be seen strewn across parts of the barrier that remained intact.
Those who made it were detained and moved to an already overflowing holding centre while the authorities figured out what to do.
Many of the Africans have trekked for more than two years, working their way north from some of the continent's poorest countries, to then spend months in the bush in Morocco while waiting to cross into Spain.
"We were just tired of living in the forest," said Sega Sow, a 19-year-old from Guinea Bissau who took part in Monday's surge. "There was nothing to eat, there was nothing to drink."
Spain's private Telecinco channel showed excerpts from a documentary, to be aired later on Tuesday, showing a Spanish Civil Guard kicking an immigrant who, along with 20 others, had scaled the fence. The scenes were filmed in July 2004.
The documentary traces the journey of two Cameroonians and their stay in Morocco before attempting to enter Spain.
"Hey black man, get back or I'm going to give you a whack on the head"
A Spanish Civil Guard
In the video, shot from the Moroccan side of the barrier, a Civil Guard can be seen pointing a stick and shouting: "Hey black man, get back or I'm going to give you a whack on the head."
In the excerpt, the lone Civil Guard tries to repel the charge, using a baton to detain the Africans as they scramble over. Shortly after, a Civil Guard vehicle arrives and one officer jumps out and begins kicking an immigrant on the ground while immigrants on the other side plead for him to be left alone.
The bodies of the five men who died last week all had bullet wounds. News reports cited Spanish and Moroccan police accusing each other of firing. A joint government investigation has been ordered.
Immigrants first tried mass assaults to cross the Melilla fence in 1997, and the number of attempts has been growing.
There have been about 10 since August and 25 this year. Most were much smaller than the ones last week and in Ceuta.
Every year, thousands of mostly sub-Saharan Africans and Moroccans try to enter Europe by clandestinely crossing in boats from Morocco to Spain.