Danilo scored in his farewell match for Porto as the Primeira Liga giants ended their campaign with a 2-0 triumph over relegated Penafiel at the Estadio Do Dragao.
Porto made tough work of their final league fixture of the season on Friday, failing to breach the defence of rock-bottom Penafiel until the 82nd minute when substitute Vincent Aboubakar pounced.
There was still time for a second goal, however, with Aboubakar picking out Danilo’s overlapping run with a throughball and the right-back slotted his shot inside the near post in the second minute of stoppage time.
The 23-year-old waved to the crowd of 29,000 in muted celebration.
Danilo has signed a contract with Real Madrid until the end of the 2020-21 season after the Spanish club agreed to pay Porto €31.5million at the in March.
The former Santos defender leaves Porto after 135 appearances in all competitions and having won the Primeira Liga in 2011-12 and 2012-13.
Porto’s win took them to 82 points, level with champions Benfica, who play on Saturday, but unable to overhaul the Lisbon-based club due to their inferior head-to-head record.