It was not always pretty but Real Madrid outbattled and then outplayed neighbors Atletico Madrid to take a 3-0 advantage from Sunday's Copa del Rey semifinal first leg at the Estadio Santiago Bernabeu.

Atletico's suffered their first defeat since October, coming three days after it took over the league league lead outright for the first time since 1996. With a game which saw some ugly confrontations and very little flowing football brought three goals -- two of them shots which took untimely deflections and one sweetly constructed and cleverly taken strike from emerging attacking star Jese Rodriguez -- Real Madrid regained a well-deserved victory over their city rivals on Wednesday.

Jese's inclusion in the starting lineup was a talking point before the match, with Gareth Bale having been ruled out injured in the hours before kickoff. With Real fans also still sensitive about Cristiano Ronaldo having been banned from La Liga action earlier on Wednesday, there were deafening whistles for early decisions from referee Carlos Clos Gomez early -- and players from both sides rushing in to dispute every decision from the official.

The opening stages were more notable for some niggly fouls and tough challenges than any creative play. But then -- out of nothing -- it was 1-0. Pepe's speculative 25 yarder was no danger until it took a huge deflection off a crouching Emilio Insua, with Atletico keeper Thibaout Courtois already airborne going the other way. "Pepe, Pepe, Pepe" chanted the home fans -- who were probably just as shocked as the player himself was at the identity of the game's first scorer.

The big defender -- often the bad guy during similar bad tempered battles with Barcelona in Jose Mourinho's time at Madrid -- also had a starring role in the first half's other plot, in which players from both sides were more interested in personal battles than doing their actual jobs on the pitch.

In one particular incident, Pepe reacted dramatically to a little shove from rival Diego Costa, who then himself went over when touched by Alvaro Arbeloa. Clos Gomez decided to take no action beyond telling them to behave. Minutes later, the official's patience was over and Pepe was booked after tripping Costa during their 57th tangle of the first 24 minutes. The Portuguese smiled as he walked back into position, knowing that by riling Costa he had distracted Atletico's most likely match-winner from his main job at hand.

The 85,000 home fans went to their halftime respite, while TV replays concentrated on the unpleasant wrongdoing which had taken place behind the refs back, with Alvaro Arbeloa getting away for a clear stamp on Costa -- who had clearly been targeted by Madrid's defense.

Atletico clearly had to change something and Simeone removed Diego Ribas for the more physical Cebolla Rodriguez at halftime. The visitors forced a few early corners, but were soon two down.

Angel di Maria slipped a beauty of a pass between his marker's legs and behind the defense to where Jese flicked the ball first time past Courtois. The pass from di Maria and finish from the youngster were sublime, although Atletico centerback Miranda was slow to cover and had his head in his hands before the ball hit the net. Jese was already celebrating -- and the 20-year-old has now scored in each of the three games in which he has stood in for Bale, who will find it very hard to get his place back whenever he does recover full fitness.

But still the scrapping continued. Costa's long expected yellow card finally came for an angry reaction to being bundled over by di Maria, who does so much hard work in the shadows, on half-way. Madrid's fans -- possibly aware that Atletico's top scorer would now be suspended for the second leg -- cheered this particular decision by the referee to the rafters.

Atletico really needed an away goal but Diego Godin's towering header just found Luka Modric -- as so often -- in the right place, and the Croatian cleared off the line. Moments later, di Maria's low 25 yarder deflected off Miranda and Courtois was wrongfooted again for 3-0. Even if two of the goals were down to unfortunate deflections, Atletico had created even less themselves, and Madrid's cooler heads deserved some luck.

Modric and di Maria, who have both been converted into hard working up and down midfielders by Ancelotti over recent months, were the two outstanding players on the match. While others around them lost their composure two of Madrid's lesser-sung players had showed their composure and class. Even Cristiano Ronaldo -- on his 29th birthday -- appeared flustered by the commotion and had a poor night by his standards.

The pace slowed after the third goal, with the fight gone even out of Atletico and Costa. Simeone's side's task in that second leg next Tuesday across town at its Estadio Vicente Calderon looks almost impossible now.

Atletico Madrid: Have lost for the first time in 24 matches in all competitions

-- (@WhoScored) February 5, 2014 Atletico Madrid: Have conceded at least 3 goals in a match in all competitions for the first time this season

-- (@WhoScored) February 5, 2014 ''Everybody was fantastic, we did everything very well,'' Madrid coach Carlo Ancelotti said after Madrid took a page out of Atletico's book and played with his pressure to keep the visitors from getting any time on the ball. ''We showed we can excel in these types of contests.''

These two will have others battles to fight before the season ends -- not least in La Liga where Atletico are still top -- but Real look well set for the Copa del Rey final.

Information from The Associated Press was used in this report.