They made no reference to Ukraine, however, raising further doubts about the war-torn country's participation in the bid after it was added to the Iberian candidacy last October.
Morocco King Mohammed VI had announced on Tuesday that the country was joining the Spain-Portugal bid.
"This puts the joint bid between Spain and Portugal in an even better position to be able to win this race and it would do a lot of good," Spanish Prime Minister Pedro Sánchez said. "It is a very positive message, and I believe that it improves our chances of being successful."
Morocco had committed to taking part in the 2030 contest more than four years ago, immediately after losing the vote for the 2026 tournament. It was in talks with the Iberian nations for a while.
"This bid by the Iberian Peninsula with Morocco is very positive and sends a very important message to the whole world and in particular to Europe and Africa, because it shows that we are two neighboring continents that want to work together," Portugal Prime Minister António Costa said.
The agreement over the World Cup bid comes after a rocky period in relations between the governments of Spain and Morocco. Sánchez has twice visited Rabat to mend ties with Morocco after their falling out in 2021 and subsequent making up over the disputed Western Sahara region.
The 2030 World Cup hosts are expected to be picked in September next year. The co-hosting bids from South America and Europe have been the expected favorites, with speculation about a Saudi-led and unprecedented three-continent project.
The inaugural 1930 World Cup host, Uruguay, is part of a centenary bid with Argentina, Chile and Paraguay.
The United States, Canada and Mexico are hosting the 2026 tournament.