The world No 4 - the home favourite this week in Madrid - fired a final-round 67 at Centro Nacional de Golf to finish on 20 under and two clear of nearest challenger Paul Dunne.
"When I chose your decision in the future direct from Augusta rsquo & it wouldn;t be to show up and wander around, " I wished to get that particular tournament", Rahm told reporters.
"I will keep doing what I am doing - get through this evening because I am a little bit disappointed - but Spain has a great champion in Jon and I am sure he will win many more of these".
Jon Rahm felt he came through his hardest Sunday as a professional to secure a landmark win on home soil at the Open de Espana.
"It's truly been the hardest Sunday I've ever had in any tournament that I've won because the crowd wanted it so much and I wanted it so much", he said after signing for a final round 67.
"Being able to win this as a pro for the Spanish people feels great, it's hard to describe".
That left Dunne or even Elvira needing an albatross on the 18th to induce a tie an order with Dunne having a birdie into pip the Spaniard to location. I felt that tension, I felt that stress, I felt everything magnified.
Dunne made a birdie after a nice chip on the par five to get back to 17 under but Rahm moved away from him again, leaving himself a flick in and holing from four feet for a birdie on the seventh.
The 23-year-old has now carded seven straight rounds in the 60's, which started at the second round of the Masters. Probably wouldn't have taken it at the start of the day but given the shots that I hit, I'm pretty happy with it leading into tomorrow.
Elvira handed the title to Rahm when he hit his tee shot into the water at the 17th and made a double bogey just moments after the champion's tee shot hung up on the bank, allowing him to save what turned out to be a crucial par.
While he birdied the 15th to get back to within two shots of Rahm and Elvira, there were to be no late mistakes from the eventual victor.
The Tshwane Open champion birdied the first, second, fifth, sixth and eighth to turn in 31 and then eagled the tenth, adding further birdies on the 13th and last.
The Spaniard, who's now the World number four, claimed a two-shot victory after carding a closing 67 to move 20 under for the tournament.
Frenchman Julien Guerrier, South African Jacques Kruyswijk and Japan's Hideto Tanihara finished six shots off the lead.