Rahm birdied the last, although he didn't need it, to grab the trophy.
"I'm just happy to play the way I did and to get it done", Rahm said after his victory.
World number four John Rahm fired a final round five-under-par 67 to win the Open de Espana in Madrid.
Rahm spoke of his "hardest Sunday" after firing a closing five-under-par 67.
Paul Dunne of Ireland looks on on the 11th fairway during day two of the Open de Espana at Centro Nacional de Golf on April 13, 2018 in Madrid, Spain. There, he escaped with a par after nearly sending his tee shot into the water, the ball just holding up in the rough.
Elvira was tied with Rahm standing on the par-3 17th tee and while both hit less than ideal tee shots Elvira's found water while Rahm's held up in a patch of long grass.
The World No.4 has now had three European Tour victories in just 19 starts, making him the third fastest player to reach that mark.More news: GAO says EPA violated spending law on Pruitt's privacy booth
More news: Ed Sheeran to appear in Danny Boyle and Richard Curtis's Beatles comedy
More news: France's Macron Says He Has Convinced Trump To Stay In Syria
Ryder Cup stalwart Ian Poulter, who snatched a late place at the Masters Tournament following his play-off triumph at the Houston Open on the US PGA Tour earlier this month, was in contention for a second victory of the season at the RBC Heritage in SC as he approached the back nine just one shot off the lead.
"It's been awesome", continued Rahm. "It's probably the hardest Sunday I've ever had to play because the amount of crowds I was carrying".
"You can tell how excited everybody is, I felt that tension, I felt that stress, I felt everything magnified". They were pushing so hard and I felt that. I tried to isolate myself, but I could feel it.
"They played a huge part, I came for them mainly so I'm just glad I can win this one for the Spanish people".
Dunne recognised that his short game let him down and was not in any way downbeat about his second place finish as he is delighted by his current form. "Spain has a great champion in Jon and I'm sure he'll win many more", said the Irishman.
Elsewhere, Japan's Satoshi Kodaira beat Si Woo Kim of Korea at the third extra hole to win the PGA Tour's Heritage Classic at Hilton Head in SC.
Warren closed with a 69 to finish on 15-under, eight shots ahead of the next best Scot, Stephen Gallacher, as he shot a third 70 in the event.