Roglic narrowly extended his overall lead.
Movistar, founded by Navarre native Eusebio Unzue, dictated the pace of the 151-kilometre hilly stage from Pamplona to Lekunberri in the green picturesque valleys of Navarre province and led a large group of riders up the final climb before it split on the descent.
Soler was the early leader on the final downhill and his team worked tirelessly to stop a challenge from George Bennett.
The Spaniard further increased his pace to finish 19 seconds ahead of Slovenian Roglic and collect his first ever Grand Tour stage win.
Dan Martin of Ireland came third while Ecuadorian Richard Carapaz came fourth, also 19 seconds behind Soler.
Roglic collected six bonus seconds and has a nine-second lead in the general classification over second-placed Martin and 11 seconds over Carapaz.
Friday's (AEDT) stage is a 166km hilly stage from Lodosa to La Laguna Negra - Vinuesa.
"We were riding on home turf today, we were very motivated about competing here in Navarre and, together with the team directors, we came up with a plan to play to our strengths on the start of the final climb," Soler said.
"We really started to put the work in from that point and the truth is from there to the finish line everything went as planned."
Teammate Enric Mas added: "We wanted to take advantage of the fact we knew the territory well and everything paid off. We also benefited from the headwind and the whole team worked magnificently.
"In the end Marc finished the job and he is the one who deserved it the most. When he overtook us he was like a motorbike and there was no stopping him."