Saudi Arabias crown prince held talks with Spains King Felipe VI on Thursday during an official visit to the country which coincides with negotiations to sell Spanish warships to the oil-rich kingdom.

The king met with Prince Mohammed bin Salman, who serves as defence minister and also controls economic policy for the world's top oil exporter, at the Zarzuela Palace on the outskirts of Madrid, before hosting a lunch there in his honour.

Prince Mohammed arrived in Spain late on Wednesday hot on the heels of a three-day official visit to France and after a tour lasting several weeks of Egypt, the United States and Britain that saw the self-styled moderniser sign multimillion-dollar deals.

Madrid is the last stop of his global diplomatic charm offensive in a bid to project a new liberal image of his conservative kingdom.

Top-selling daily newspaper El Pais reported earlier this week that Spain would likely make progress during his visit on a deal to sell five corvettes warships to Saudi Arabia for around two billion euros ($2.5 billion).

"The signing of this memorandum of understanding (on defence) can be a step in that direction," a Spanish government source told AFP.

A coalition of NGOs including Amnesty International and Greenpeace urged Madrid not to go ahead with the deal because the corvettes could be used in Saudi Arabia's military campaign against Iran-backed Houthi rebels in Yemen, where thousands of civilians have been killed.

But Spain's loss-making shipbuilder Navantia is placing a lot of hope on the deal, which has reportedly been under negotiation for two years.

Spanish firms have already won two major infrastructure contracts in Saudi Arabia in recent years.

A Spanish consortium, Al-Shoula, is building a high-speed railway across the desert to link the holy cities of Mecca and Medina while Spanish construction group FCC leads one of three consortia building a rapid transit system in the Saudi capital.

Spain's public works ministry has identified Saudi Arabia as one a "nation of interest".

Under Prince Mohammed's "Vision 2030", a package of economic and social policies designed to free the kingdom from dependence on oil exports, Riyadh plans to spend 32 billion euros in transportation infrastructure in the next decade.

Spain and Saudi Arabia's royal families are very close as King Felipe VI's father Juan Carlos was a close friend of the kingdom's late King Fahd, who reigned from 1982 to 2005, and is close to his brother King Salman.