The US-Mexico border is a little under 3,300 kilometres long.
In July, it was reported that more than 19,580 migrants had landed on Spanish shores so far this year.
Spain has been battling a migration crisis.
The US president is said to have made the suggestion during a meeting with Josep Borrel, Spain's foreign minister.
The idea was simple: "Build a wall across the Sahara".
Meghan Markle's Mom Doria Attends Kensington Palace Event Celebrating Duchess's Cookbook Release
At one point, Meghan addressed the crowd like a true pro, talking for three full minutes without notes about her "first project" as a royal.
Mr Trump's pledge to build a wall between the USA and Mexico was one of his best-known election promises.
The Spaniard did not reveal when the commander-in-chief floated the plan, although other sources said it was in June when he flew to the States during the White House visit of Spain's King and Queen.
The border issue was also a concern in the United 2026 World Cup joint bid between the US, Canada, and Mexico.
A spokesman for the Spanish Foreign Ministry confirmed to Borrell's comments to CNN but said the ministry had no further comment in relation to the minister's remarks.
It seems Trump struggles to avoid discussing his desired border wall in nearly any context, and on Tuesday said a recent visit to a 9/11 memorial in Pennsylvania gave him more inspiration for his vision. "And it's sort of lovely, what they did is incredible", Trump told Hill.TV in an interview on Tuesday.
In June, Trump received global backlash when the U.S. government separated migrating children from parents, some asylum seekers after crossing the border.
- All storm signals lifted as Typhoon 'Ompong' moves farther from PH
- Maroon 5 To Play Super Bowl Halftime 2019
- Top 8 #dagga memes we found after it was legalised
- Browns fans go after Bud Light Victory Fridge after win
- Lionel Messi is the Champions League's hat-trick king
- Flash Flood Warning as Remnants of Florence Move Through N.H
- Cristiano Ronaldo escapes extended ban for red card against Valencia
- Kavanaugh denies allegation anew, arrives at White House
- Sen. Elizabeth Warren excited about Josh Gordon joining Patriots
- Poland suggests 'Fort Trump' as U.S. weighs military base