Real Madrid needed a wonderful free kick from David Alaba to squeeze past Almeria and get their La Liga title defence off to a winning start as they claimed a 2-1 victory on Sunday night.
Manager Carlo Ancelotti made five changes from the Real side that beat Eintracht Frankfurt in the UEFA Super Cup, with Alaba, Casemiro, Eder Militao and Luka Modric all being benched as Aurelien Tchouameni and Antonio Rudiger made their league debuts.
That decision looked to have backfired when Largie Ramazani put the hosts ahead, but Lucas Vazquez equalised before substitute Alaba scored with his first touch in the 75th minute, curling in a free kick barely moments after his introduction.
Real fell behind early on as Ramazani latched onto a lobbed pass from Inigo Eguaras to run in and fire beyond Thibaut Courtois to give the hosts an unfancied lead.
Los Blancos went close in quick succession after going behind, with Federico Valverde drawing Fernando Martinez into a flying stop at the near post before Karim Benzema skewed over from Vinicius Junior's cut back under pressure from Kayky.
They remained susceptible on the counter attack, however, and almost fell 2-0 behind when Umar Sadiq broke free and smashed just over the bar.
Benzema started to get his radar going as he headed into Martinez's arms from Toni Kroos' swinging cross, though Almeria continued to carry a threat as Sadiq tussled with La Liga debutant Antonio Rudiger and Nacho throughout the first half.
Real continued to push as Vinicius raced clear to force Martinez into a save at his near post before Rudiger's header was again repelled by the Spanish goalkeeper.
Vazquez soon had the ball in the back of the net with a terrific first-time finish from Kroos' cross, though the strike was ruled out for offside. The call looked extremely tight, but Almeria were given the benefit.
Eguaras sent a long shot whizzing past Courtois' right post as Almeria reminded the Spanish champions of their threat, while at the other end Vinicius and Benzema linked up to set up Valverde, whose drilled shot was too central and easily stopped.
However, Real's increased pressure on Almeria's goal deserved an equaliser and it was Vazquez who steered home from Benzema's scuffed pass after Vinicius had burst into the box.
The visitors began to impose themselves towards full time and got the winner they just about deserved when Alaba whipped his free kick over Almeria's wall and into the far corner beyond Martinez's reach. Martinez was brilliant in the Almeria goal, making 13 saves and keeping the game tight.
The old guard were required but it will be seen as job done for Real, who are next in action when they visit Celta Vigo on Saturday.
Real Madrid player ratings vs Almeria - La Liga
1. Real Madrid (4-3-3)
GK: Thibaut Courtois - 6/10 - Feet were a little sluggish as Ramazani fired in. Made a few saves from efforts that were a little central.
RB: Lucas Vazquez - 9/10 - Had the ball in the back of the net but it was disallowed for offside. Wasnt to be denied in the second half, steering in from close range. Covered almost 11.5 kilometres and was his side's best player.
CB: Antonio Rudiger - 5/10 - Caught out for Almeria's opener, dropping too deep to keep Ramazani onside. Rarely looked comfortable and will need to improve quickly in his new surroundings.
CB: Nacho - 5/10 - Looked shaky alongside debutant Rudiger. Was barged past by Sadiq, who neither Nacho nor Rudiger will be keen to face anytime soon.
LB: Ferland Mendy - 4/10 - Had a few calamitous moments - including falling on the ball to gift Almeria a counter attack. Looks like he could drop out of Real's starting XI this season and his performance here wasn't encouraging.
CM: Eduardo Camavinga - 5/10 - Cynically dragged down Ramazani for a booking. Couldn't produce his trademark runs from that deep that often catch the eye.
CM: Aurelien Tchouameni - 5/10 - Played the holding role on his Real debut but looked a little clumsy at times in the face of Almeria's press.
CM: Toni Kroos - 6/10 - Not at his game-dictating best, especially in the first half. Dropped deeper once Tchouameni departed and improved.
RW: Federico Valverde - 8/10 - Had a few early pops at goal, forcing Fernandez into action. Driving runs helped Real move up the pitch quickly. Had a lot of shots but just couldn't get on the scoresheet.
ST: Karim Benzema - 7/10 - Produced a few rusty finishes to some tough opportunities in the opening 45. Didn't get a goal but displayed his wonderful interplay and assisted Vazquez.
LW: Vinicius Junior - 7/10 - Constant threat on the left, getting in behind to test Fernandes at the near post at 1-0 down. Might have had a couple of goals on another day but a great run into the box set led to Vazquez's equaliser.
SUB: Luka Modric (46' for Camavinga) - 7/10 - Added a needed level of calm that had been missing from Real's midfield.
SUB: Eden Hazard (58' for Tchouameni) - 7/10 - A more positive contribution from the injury-riddled Belgian, who played a small part in both of Real's goals.
SUB: David Alava (74' for Mendy) - 8/10 - Introduced in the 74th minute and had netted a free kick with his first touch by the 75th. Helped Real see out the result.
SUB: Casemiro (83' for Kroos) - N/A - On to sure things up at the end.
SUB: Dani Ceballos (83' for Vinicius) - N/A - Fresh legs out wide.
Manager: Carlo Ancelotti - 5/10 - Elected to leave Alaba, Casemiro, Eder Militao and Modric all on the bench for Real's first league game of the season. Real could have laid down a marker but instead, they were sluggish and ineffective, needing experienced squad members to bail them out.