The plan aims to make Portugal one of the first countries to offer consumers the possibility of nationwide charging stations, boosting electric cars at a time of soaring gasoline prices.
The viability of the network could be helped by Portugal's relatively small size.
Renault and Nissan separately have similar agreements with Israel and Denmark but the deal with Portugal is the first to directly include both automakers.
Prime Minister Jose Socrates said the move was aimed at reducing reliance on oil in Portugal which imports all its fossil fuel needs. Import costs of oil have nearly doubled this year.
"We are living through an intense petrol shock, which affects the lives of everybody," Socrates said during a ceremony to announce the plan.
"We are not going to stand still like in the first and second oil shocks. We want to increase the country's energy independence."
Carlos Ghosn, president and chief executive of Nissan and Renault, said the partnership with Portugal could be a landmark for the development of a viable model for the adoption of electric cars.
"Portugal is the first country to start a direct partnership with the alliance (Renault and Nissan), creating a joint public-private model for zero-emission vehicles to become a credible alternative," he said.
Under the agreement, the government and the automakers will study the best way to make electric cars attractive for consumers and start viability studies on a nationwide network of charging stations.
The carmakers have agreed to mass market their electric cars in Portugal from 2011, making it one of the first to receive unique all-electric vehicles from Nissan and Renault.
Socrates, who has championed alternative energy such as wind power, said the key was to ensure consumers do not pay more for electric cars than petrol cars.
"On the day that a city has cars that have no emissions and no noise we will never turn back," Socrates said.
Carlos Tavares, vice-president of Nissan, said electric cars will have better or the same performance as petrol vehicles and the total cost will be the same with government incentives.
He said electric cars with a range of 160 km would meet the daily driving needs of 90 percent of drivers.
Nissan and Renault have said they also want to mass market electric cars in the United States in 2011/12. Car manufacturers that are seeing lower sales due to the surging oil price are rushing to offer cheaper alternatives to consumers.
General Motors Corp., which saw its shares drop to a 54-year low recently due to the slumping U.S. car market, is rushing to finish the production version of its Chevy Volt electric car.